Stellar Parallax可在桌面上运行,静态图像可在移动设备上运行
我的网站使用Stellar.js在覆盖用户屏幕宽度的许多图像上创建视差效果。 Stellar以一半的速度滚动图像,用户向下滚动页面创建一个很好的效果。 我最初使用这段代码:
MY CSS FILE /* Separator About - Parallax Section */ .sep { background-attachment: fixed!important; background-position: 50% 0!important; background-repeat: no-repeat!important; width: 100%!important; height: 180px!important; position: relative!important; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } .about { background-image: url(../img/about-sep.jpg);
MY HTML FILE