Get started with rellax CDN

MIT licensed

Rellax is a lightweight library for creating parallax scrolling effects with ease.

Tags:
  • parallax
  • lightweight

Stable version

Copied!

How to start using rellax CDN


<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
    <script src="https://cdn.jsdelivr.net/npm/rellax@1.12.1/rellax.min.js"></script>
</head>
<body>
    <div id="scene">
        <img class="rellax" data-rellax-fade-in data-rellax-speed="0" src="image1.jpg" alt="Image 1">
        <img class="rellax" data-rellax-rotate-y data-rellax-speed="50" src="image2.jpg" alt="Image 2">
        <img class="rellax" data-rellax-translate-x data-rellax-speed="100" src="image3.jpg" alt="Image 3">
    </div>
    <script>
        const scene = new Rellax('.rellax');
    </script>
</body>
</html>
Copied!
Copied!

All versions