Drupal 上的 jCarousel

发布于 2024-10-26 12:05:25 字数 482 浏览 8 评论 0原文

我的 Drupal-6 网站上有 jCarousel 模块。在我的页面上,我有以下代码:

<?php
$items = array (
  0 => '<img src="http://dummyimage.com/100x100/000/fff&amp;text=Bio" />',
  1 => '<img src="http://dummyimage.com/100x100/000/fff&amp;text=Bio" />',
      ....
);
$options = array (
  'wrap' => 'circular',
  'auto' => '5',
);
print theme('jcarousel', $items, $options);
?>

问题是当页面最初加载时,它将图像加载到列表中,然后将它们放入轮播中。我怎样才能使图像直接加载到轮播中而不是首先显示为列表?

I have the jCarousel module on my Drupal-6 website. On my page I have the following code:

<?php
$items = array (
  0 => '<img src="http://dummyimage.com/100x100/000/fff&text=Bio" />',
  1 => '<img src="http://dummyimage.com/100x100/000/fff&text=Bio" />',
      ....
);
$options = array (
  'wrap' => 'circular',
  'auto' => '5',
);
print theme('jcarousel', $items, $options);
?>

The problem is the when the page originally loads, It loads the images in a list and then puts them into a carousel. How can I make it so that the images load directly into a carousel instead of displaying as a list first?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫七 2024-11-02 12:05:25

在没有看到实际的完整代码的情况下,我猜测一个简单的“溢出:隐藏”可以解决问题。
据我所知,轮播项目始终需要位于列表中,您只是不希望它们在加载时显示在容器之外?

Without seeing the actual full code, I'm guessing a simple 'overflow:hidden' could solve the problem.
As far as I know the carousel items always need to be in a list, you just don't want them to display outside of the container while loading?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文