Minimal Image Parallax Scroll Effect In JavaScript – Parallax.js

Category: Animation , Javascript | June 1, 2020
Author:himanshu12345yadav
Views Total:336 views
Official Page:Go to website
Last Update:June 1, 2020
License:MIT

Preview:

Minimal Image Parallax Scroll Effect In JavaScript – Parallax.js

Description:

Just another vanilla JavaScript implementation of the smooth parallax scroll effect for images.

Works with any images regardless of image size. If the image height is less than the container height the library will automatically scale the image to overflow the container.

How to use it:

1. Add the stylesheet parallax.css he JavaScript parallax.js to the web page.

<link rel="stylesheet" href="parallax.css" />
<script defer src="parallax.js"></script>

2. Add your image to the parallax container and the library will take care of the rest.

<div class="parallax-container">
  <img src="bg.jpg" alt="">
</div>

You Might Be Interested In:


Leave a Reply