这应该是一个简单的修复,但我没有足够的经验来解决问题。我的网站在几个页面上使用IosSlider。在将图像加载到实际的滑块窗口之前,IosSlider页面会显示为垂直(或分散)加载图像。我如何解决这个问题,使滑块负载更平滑?这个问题发生在所有浏览器上。IosSlider图像在初始页面加载时垂直加载(或分散)
http://www.restipe.com/Residential/elegant-home.html
CSS的IOSSlider:
.responsiveHeight {
height: 0;
padding: 0 0 40% 0; /* responsive slider height = 40% of the browser width */
position: relative;
overflow: visible;
}
.responsiveHeight > .inner {
position: absolute;
width: 100%;
height: 100%;
}
.iosSlider {
width: 100%;
height: 100%;
}
.iosSlider .slider {
width: 100%;
height: 100%;
}
.iosSlider .slider img {
float: left;
height: 100%;
padding-right:2px;
}
.responsiveHeight .prevButton {
position: absolute;
top: 50%;
left: 1%;
width: 20px;
height: 40px;
background-image: url(../images/prev.png);
z-index: 2;
}
.responsiveHeight .nextButton {
position: absolute;
top: 50%;
right:1%;
width: 20px;
height: 40px;
background-image: url(../images/next.png);
z-index: 2;
}
的Javascript
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"> </script>
<script type="text/javascript" src="../js/jquery.iosslider.js"></script>
<!--IosSlider -->
<script>
$(window).load(function() {
$('.iosSlider').iosSlider({
desktopClickDrag: true,
navNextSelector: $('.nextButton'),
navPrevSelector: $('.prevButton')
});
});
</script>
谢谢, Jill
没有小提琴很难啾啾你的CSS来尝试解决你的问题。看起来像你的滑块的容器需要溢出:隐藏(或他们的父母之一) – 2015-02-05 15:15:28