Add a Parallax Effect

Posted on Mar 20, 2025

by Jimmy


A super easy way to add parallax effects to your project using the Rellax JavaScript library.

Add the rellax class to any element:

HTML
        
            <div class="rellax">
  I’m slow and smooth
</div>        
    

And optionally play around with the speed:

HTML
        
            <div class="rellax" data-rellax-speed="-3">
  I’m slow and smooth
</div>

<div class="rellax" data-rellax-speed="7">
  I’m super fast!!
</div>

<div class="rellax" data-rellax-speed="-5">
  I’m extra slow and smooth
</div>        
    

These examples were taken straight from their documentation. Check it out to learn more about the options.

Note

The Rellax library is already installed as part of our boilerplate, so you can skip the “getting started” section of their documentation.


Back to Snippets