first commit

This commit is contained in:
Petite Flamby 2023-02-23 11:25:13 +01:00
commit 7e9f45f56e
3 changed files with 48 additions and 0 deletions

12
assets/js/app.js Normal file
View file

@ -0,0 +1,12 @@
'use strict';
// image animation (joao)
var upItem = document.querySelector('.images--right');
var bottomItem = document.querySelector('.images--left');
const sideItem = document.querySelector('.svg__side');
window.addEventListener("scroll", function() {
upItem.style.transform = "translateX(" + window.pageYOffset / 15 + "px)";
bottomItem.style.transform = "translateX(" + -window.pageYOffset / 10 + "px)";
sideItem.style.transform = "translateY(" + window.pageYOffset / 5 + "px)";
});