Parallax.js 视差滚动(Parallax Scrolling)插件


Parallax.js 视差滚动(Parallax Scrolling)插件

第一步引入bfwone

第二步执行插件代码

示例如下

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
    <script type="text/javascript">
        bready(function() {
            use(["parallax"]);
        });
    </script>
    <style>
        body {
            background: white;
        }
        .parallax-window {
            min-height: 400px;
            background: transparent;
        }
    </style>
</head>
<body>
    <div class="parallax-window" data-parallax="scroll" data-image-src="//repo.bfw.wiki/bfwrepo/image/demo.jpg"></div>
    <div>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>

    </div>
    <div class="parallax-window" data-parallax="scroll" data-image-src="//repo.bfw.wiki/bfwrepo/image/demo.jpg"></div>

    <div>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>
        <p>
            parallax scroll effect
        </p>

    </div>
</body>
</html>

官方地址 http://pixelcog.github.io/parallax.js/
立即下载parallax.js查看所有js插件

网友评论0

程序员在线工具箱