Jquery 平滑div滚动:最后一张图片下降到底线
我的卷轴与正常配置完美配合Jquery 平滑div滚动:最后一张图片下降到底线,jquery,jquery-plugins,smooth-scrolling,Jquery,Jquery Plugins,Smooth Scrolling,我的卷轴与正常配置完美配合 #makeMeScrollable{ width:100%; height: 500px; position:absolute; left:0; top:110px; } #makeMeScrollable div.scrollableArea img{ position: relative; float: left; margin: 0 5px 0 0; padding: 0; } 但是当窗口高度小于768px时,我在CSS
#makeMeScrollable{
width:100%;
height: 500px;
position:absolute;
left:0;
top:110px;
}
#makeMeScrollable div.scrollableArea img{
position: relative;
float: left;
margin: 0 5px 0 0;
padding: 0;
}
但是当窗口高度小于768px时,我在CSS中做了以下更改:
@media only screen and (max-height : 768px) {
#makeMeScrollable{
height: 500px;
}
#makeMeScrollable div.scrollableArea img{
height: 400px
}
}
在Chrome上运行良好,但在Firefox和IE上,最后一个图像会下降到底线 如果使用填充而不是边距更改图像的CSS,会发生什么情况?像这样:
#makeMeScrollable div.scrollableArea img{
position: relative;
float: left;
margin: 0;
padding: 0 5px 0 0;
}
这在过去有时对我有效。好吧,我是这样解决的:
$(document).ready(function () {
$("#makeMeScrollable").smoothDivScroll({
manualContinuousScrolling: false,
autoScrollingMode: "onStart",
autoScrollingDirection: "backAndForth",
autoScrollingStep: 1
});
});
这是第一个初始化它的脚本。我希望这些图像能反复出现
我是这样做的,现在问题解决了:
$(document).ready(function () {
$("#makeMeScrollable").smoothDivScroll({
manualContinuousScrolling: true,
autoScrollingMode: "onStart",
autoScrollingStep: 1
});
});