加载时 jQuery Nivo 滑块中的图像意外出现
因此,我正在一个实现了 Nivo 滑块的网站上工作,我遇到的问题是,当我的页面加载(新鲜或缓存后)时,图像全部直接显示在页面下方,并且当页面完全显示时加载,然后图像消失并且幻灯片动画开始。
在这里查看一下,在页面顶部图像发生变化的地方。当页面加载时,您将看到应该隐藏的图像,出现,然后消失在幻灯片中。
我已经在多个浏览器等上进行了测试。
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.
I've tested on multiple browsers etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将 display: none; 应用于除第一个图像之外的所有图像。
例如:
Apply display: none; to all your images except the first one.
e.g.:
如果您要在 WordPress 中实现此功能,只需将 display:none 添加到 li 标记即可。
If you are implementing this into WordPress you just add display:none to the li tag.
问题解决了!在滑块的 div 样式中,请务必设置图像的高度并将 div 的溢出设置为隐藏
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