加载时 jQuery Nivo 滑块中的图像意外出现

发布于 2024-11-04 22:44:25 字数 289 浏览 5 评论 0原文

因此,我正在一个实现了 Nivo 滑块的网站上工作,我遇到的问题是,当我的页面加载(新鲜或缓存后)时,图像全部直接显示在页面下方,并且当页面完全显示时加载,然后图像消失并且幻灯片动画开始。

在这里查看一下,在页面顶部图像发生变化的地方。当页面加载时,您将看到应该隐藏的图像,出现,然后消失在幻灯片中。

http://www.bandofthedark.com/

我已经在多个浏览器等上进行了测试。

So I'm working on a site where I've implemented the Nivo slider and the problem I have is that, when my page loads (fresh or after cached) is that the images all show up straight down the page and when the page fully loads, then the images disappear and the slide animations begin.

Check it out here, on the top of the page where the images change. When the page loads up, you'll see the images that are supposed to be hidden, appear, then disappear into the slide.

http://www.bandofthedark.com/

I've tested on multiple browsers etc.

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

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

发布评论

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

评论(3

锦爱 2024-11-11 22:44:25

display: none; 应用于除第一个图像之外的所有图像。

例如:

<img src="imgs/botdEVENTone.jpg" width="820" height="300" style="display: none;" />

Apply display: none; to all your images except the first one.

e.g.:

<img src="imgs/botdEVENTone.jpg" width="820" height="300" style="display: none;" />
山色无中 2024-11-11 22:44:25

如果您要在 WordPress 中实现此功能,只需将 display:none 添加到 li 标记即可。

<li style="display:none;"> </li>

If you are implementing this into WordPress you just add display:none to the li tag.

<li style="display:none;"> </li>
顾铮苏瑾 2024-11-11 22:44:25

问题解决了!在滑块的 div 样式中,请务必设置图像的高度并将 div 的溢出设置为隐藏

#slider {
  height: 300px; 
  overflow: hidden; 
}

problem solved! in the slider's div style be sure to set the height of your images and set the overflow of the div to hidden

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