当前位置: 首页 > 工具软件 > parallax.js > 使用案例 >

parallax.js插件,使页面随鼠标呈现出层次化的动画效果

柳浩大
2023-12-01

用法:

<ul id="scene" class="scene">
<li class="layer" data-depth="-0.20"><img src="images/bannerbg01.png"></li>
<li class="layer" data-depth="0.30"><img src="images/bannerbg02.png"></li>
<li class="layer" data-depth="0.02"><img src="images/bannerbg03.png"></li>
</ul>

<script src="js/parallax.min.js"></script>
<script>
var scene = document.getElementById('scene');
var parallax = new Parallax(scene);
</script>

 

转载于:https://www.cnblogs.com/fangdx/p/3659128.html

 类似资料: