|
|
| Line 48: |
Line 48: |
| Welcome to ''Your Wiki''. Click any image to explore. | | Welcome to ''Your Wiki''. Click any image to explore. |
| </div> | | </div> |
|
| |
| <!-- PARALLAX SCROLL JS -->
| |
| <script>
| |
| document.addEventListener('scroll', function() {
| |
| const scroll = window.scrollY;
| |
| const back = document.querySelector('.layer-back');
| |
| const mid = document.querySelector('.layer-mid');
| |
| const front = document.querySelector('.layer-front');
| |
|
| |
| // Move UP as you scroll down (negative = up)
| |
| back.style.transform = `translateZ(-400px) scale(1.5) translateY(${scroll * 0.4}px)`;
| |
| mid.style.transform = `translateZ(-200px) scale(1.3) translateY(${scroll * 0.6}px)`;
| |
| front.style.transform = `translateZ(0) scale(1) translateY(${scroll * 0.8}px)`;
| |
| });
| |
| </script>
| |
Welcome to Your Wiki. Click any image to explore.