javascript - Rendering issues with parallax-effect -


I am trying to create a vertical effect using the window. But ScrollTop but I'm running in a rendering problem that looks like I'm getting an onscoll after a viewport is provided. As you can see (code attached) the movement of the box is irregular and choppy.

Behavior is similar in all WebKit based browsers and Firefox.

JavaScript

Markup

  & lt; Div class = "red box" & gt; Apply for liability. & Lt; / div & gt; & lt; div class = "green box" data-paralax = "0.4" & gt; Konstantur adipiscing elite & Lt; / div & gt; & lt; div Arg = "blue box" data-paralax = "0.3"> Nam consectetur dolor. & Lt; / div> Thinking whether it is worth using a prefabricated one and not be "re-done"    

< / Div>

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -