IE中的Nivo滑块显示问题

我正在使用nivo滑块进行图像幻灯片放映。 所有在FF,Chrome等看起来都不错。虽然在IE中显示非常奇怪(见附件)(在8(xp)+ 9(win7)上测试)。

有没有人遇到过这个?

这是代码:

 $('#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} 

在此处输入图像描述

我注意到重复图像部分(15)的数量与默认的“切片”设置相关。我将其更改为1并解决了问题。

 $('#slider').nivoSlider({ effect: 'fade', // Specify sets like: 'fold,fade,sliceDown' slices: 1 // For slice animations }); 

我知道这是非常基本的,但你有没有机会尝试其中一个主题? 所有小的,IE特定的修复都在nivo-slider.css ,主要的css,如果你想要一个主题,你还必须添加主题的CSS。 我有相同的症状,这是我的答案^ _ ^

所以,要明确的是,如果你使用其中一个主题,你的css链接rels应如下所示:

 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中)