Elements parallax animations
Rellax plugin is used to create animations for some elements when the page is scrolled. It is located in app/modules/rellax-maste
r folder.
Floating elements from “Latest work” and “Amazing features section” were built with this plugin.
If you want to implement this you will need to add a class named “rellax” preceded by a attribute “data-rellax-speed
” and “data-rellax-percentage
” like in the example bellow.
<img class="dm__workSection-obj rellax" data-rellax-speed="-1" data-rellax-percentage="0.5" src="img-assets/decoration_01.png" alt="">
The animation can be enabled with the following javaScript code:
<script> // Center all the things! var rellax = new Rellax('.rellax', { center: true }); </script>
Also you can disable it with the rellax.destroy();
function.
You can find more about this on https://github.com/dixonandmoe/rellax