Nivo 滑块将图像向下推
我正在尝试使用 nivo 滑块。我最初将其设置为“折叠”传输。效果很好。我将其更改为“淡入淡出”,现在当图像淡入下一个时,它看起来被推低了。以前有人遇到过这个问题吗?这是 jQuery 和 css。
$(window).load(function() {
$('#slider').nivoSlider({
effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
animSpeed:500, // Slide transition speed
pauseTime:5000, // How long each slide will show
startSlide:4, // Set starting Slide (0 index)
/Nevo Slider/
slider {
position:relative;
width:900px;
height:250px;
background:url(images/loading.gif) no-repeat 50% 50%;
margin-bottom: 20px;
}
slider img {
position:absolute;
top:0px;
left:0px;
display:none;
}
slider a {
border:0;
display:block;
} /End of Nevo Slider/
这是一个链接 http://kerrydean.ca/Grey%20River/greyRiverTemplate2.html
I'm trying to use the nivo slider. I had it originaly set to "fold" the trasnistions. It worked fine. I changed it to "fade" and now when the image fades to the next, it appears pushed down. Anyone had this issue before? Here is the jQuery and css.
$(window).load(function() {
$('#slider').nivoSlider({
effect:'fade', // Specify sets like: 'fold,fade,sliceDown'
animSpeed:500, // Slide transition speed
pauseTime:5000, // How long each slide will show
startSlide:4, // Set starting Slide (0 index)
/Nevo Slider/
slider {
position:relative;
width:900px;
height:250px;
background:url(images/loading.gif) no-repeat 50% 50%;
margin-bottom: 20px;
}
slider img {
position:absolute;
top:0px;
left:0px;
display:none;
}
slider a {
border:0;
display:block;
} /End of Nevo Slider/
Here is a link
http://kerrydean.ca/Grey%20River/greyRiverTemplate2.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您需要删除幻灯片上所有对象标签包裹的图像。
示例:从
到
You need remove all object tag wrapped image on your slide.
Example: from
to
我遇到了同样的问题,我在网上找到了一些提示,但没有一个对我有用。这是为我解决问题的 CSS 规则:
我添加了 top:0 并将图像移动到位。此外,这种图像移位问题似乎仅在使用“淡入淡出”功能时才会发生。
I had this same problem and I found several tips across the web but none of them worked for me. Here is the CSS rule that fixed the problem for me:
I added the top:0 and it shifted the images into place. Also, this image shifting issue seems to only happen when using the 'fade' feature.
我遇到了同样的问题,当我将 theme-default 类添加到 div#slider
并当然加载了 default.css时,它就解决了
I had the same problem and it solved when I added the theme-default class to the div#slider
and of course loaded the default.css
您需要将
.nivoSlider
类应用到容纳图像的 #slider id,此外,您还要包含 jQuery 两次。You need to apply the
.nivoSlider
class to your #slider id housing the images, also, you're including jQuery twice.是在 WordPress 中吗?如果是这样,您将需要隐藏自动添加的
标签。添加这个CSS,这应该可以解决问题(至少对我有用):
Is it in WordPress? If so, you will need to hide the
<p>
tags that get added automatically. Add this CSS and this should do the trick (at least it worked for me):