简体   繁体   English

用于视差滚动的Stellar.js已被弃用

[英]Stellar.js for parallax scrolling is deleyed

I am using the plugin stellar.js to create a parrallax effect... Esentially I want a simple background scroll slower than the rest of the site like www.OmarHabash.com. 我正在使用插件stellar.js来创建parrallax效果...本质上,我希望简单的背景滚动速度比其他网站(如www.OmarHabash.com)慢。

I think everything is set up correctly this is the site that I am working on. 我认为一切都已正确设置, 这是我正在工作的站点。 ... The first three spotlight divs are scrolling slower than but it seems to gradually speed up... It is not supposed to do that. ...前三个div的div滚动速度比div慢,但似乎逐渐加快了速度...不应这样做。

This is the init that I am using 这是我正在使用的init

$(window).stellar();

and this is one of three divs that I am using the script on. 这是我使用脚本的三个div之一。

<div class="home-100-2" data-stellar-background-ratio="1.1" style="background: url('<?php the_field('sl-image-2') ?>')fixed;">

if you look at the site you will see the problem. 如果您查看该站点,则会发现问题。 http://dfwima.4mf.co/ http://dfwima.4mf.co/

You have some CSS transition styling applied to .home-100-1, .home-100-2, .home-100-3. 您已将某些CSS过渡样式应用于.home-100-1,.home-100-2,.home-100-3。 Try to remove them: 尝试删除它们:

  .home-100-1, .home-100-2, .home-100-3 {
    height: 320px;
    background: #000;
    border-bottom: 10px solid #000;
    width: 100%;
    /* transition: all .6s; */
    /*-moz-transition: all .6s;*/
    /* -webkit-transition: all .6s; */
    /* -o-transition: all .6s; */
    background-size: 100% auto !important;
  }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM