我正在使用nivo滑块进行图像幻灯片放映。所有在FF,Chrome等看起来都不错。虽然在IE中显示非常奇怪(见附件)(在8(xp)+ 9(win7)上测试)。
以前有人遇到过这个吗?
以下是代码:
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="pathtoimage" alt="" />
<img src="pathtoimage" alt="" />
<img src="pathtoimage" alt="" />
<img src="pathtoimage" alt="" />
</div>
</div>
$('#slider').nivoSlider({
effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
slices: 15, // For slice animations
boxCols: 8, // For box animations
boxRows: 4, // For box animations
animSpeed: 500, // Slide transition speed
pauseTime: 3000, // How long each slide will show
startSlide: 0, // Set starting Slide (0 index)
directionNav: false, // Next & Prev navigation
directionNavHide: true, // Only show on hover
controlNav: true, // 1,2,3... navigation
controlNavThumbs: false, // Use thumbnails for Control Nav
pauseOnHover: true, // Stop animation while hovering
manualAdvance: false, // Force manual transitions
prevText: 'Prev', // Prev directionNav text
nextText: 'Next', // Next directionNav text
randomStart: true, // Start on a random slide
beforeChange: function(){}, // Triggers before a slide transition
afterChange: function(){}, // Triggers after a slide transition
slideshowEnd: function(){}, // Triggers after all slides have been shown
lastSlide: function(){}, // Triggers when last slide is shown
afterLoad: function(){} // Triggers when slider has loaded
});
#slider { height: 309px; }
.nivoSlider {position:relative; background:url(../thirdparty/nivo-slider/themes/bar/loading.gif) no-repeat 50% 50%; width:640px; height: 309px; box-shadow: none !important; float: left}
.nivoSlider img {position:absolute; top:0px; left:0px; display:none;}
.nivoSlider a {border:0; display:block;
}
.sliderSurround{position: relative; width: 640px; height: 309px;}
.nivo-controlNav{position: absolute; bottom: 0; right: 0; z-index: 999;}
.nivo-control{background-image: none !important; background-color: #E00019 !important; cursor: pointer;}
.nivo-control.active{background-color: #fff !Important}
.theme-default .nivo-controlNav a{height: 16px !important; width: 16px; margin:0 4px;}
.theme-default .nivo-controlNav{padding: 15px 10px !important}
答案 0 :(得分:6)
我注意到重复图像部分(15)的数量与默认的“切片”设置相关。我将其更改为1并解决了问题。
$('#slider').nivoSlider({
effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
slices: 1 // For slice animations
});
答案 1 :(得分:2)
我知道这是非常基本的,但你有没有机会尝试其中一个主题?所有小的,IE特定的修复都在nivo-slider.css
,主要的CSS,如果你想要一个主题,你还必须添加主题的CSS。我有相同的症状,这是我的答案^ _ ^
所以,要明确的是,如果你选择其中一个主题,你的css链接rel应该是这样的:
link rel="stylesheet" type="text/css" href="/css/nivo-slider.css"
link rel="stylesheet" type="text/css"
href="/css/nivo-slider-themes/default/default.css"
(修复此问题也可能会使标题框“出现在Chrome和FF中”