0

我的卷轴与正常配置完美配合。

#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 上,最后一张图片掉到了底线。

4

2 回答 2

1

如果您使用填充而不是边距更改图像的 CSS 会发生什么?像这样:

#makeMeScrollable div.scrollableArea img{
  position: relative;
  float: left;
  margin: 0;
  padding: 0 5px 0 0; 
}

这在过去有时对我有用。

于 2013-02-18T07:07:15.430 回答
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
        });
    });
于 2013-03-12T12:43:05.997 回答