使用Skrollr fixd height工作错误

时间:2015-06-19 13:15:03

标签: javascript

我使用Skrollr.js来测试视差背景。 示例代码 http://jsfiddle.net/r0g5ade7/

<div
        class="parallax-image-wrapper"
        data-anchor-target="#bacons + .gap"
        data-bottom-top="transform:translate3d(0px, 200%, 0px)"
        data-top-bottom="transform:translate3d(0px, 0%, 0px)"
        style="height:1500px;top:-1500px;">

        <div
            class="parallax-image"
            style="background-image:url(http://bmws010.ugear.tw/ImgAdmin/Diary/f1m.jpg);height:1500px;top:0;"
            data-anchor-target="#bacons + .gap"
            data-bottom-top="transform: translate3d(0px, -80%, 0px);"
            data-top-bottom="transform: translate3d(0px, 80%, 0px);"
        ></div>

示例有3个图像帧,我尝试将第2个图像帧高度从100%更改为1500px,但背景工作错误。

如果调整窗口大小,框架工作错误。

这是我的测试代码http://jsfiddle.net/r0g5ade7/3/

我如何解决问题。

0 个答案:

没有答案