Ajout des fichiers

This commit is contained in:
2025-01-17 22:35:54 +01:00
parent e4689a651d
commit 03250eab77
5 changed files with 581 additions and 0 deletions

33
header.js Normal file
View File

@@ -0,0 +1,33 @@
const boutons = [
document.getElementById("accueil"),
document.getElementById("entreprise"),
document.getElementById("produits"),
document.getElementById("contact")
]
function change_fond(element) {
console.log(element);
element.style.textShadow = "2px 2px 5px black";
element.style.transition = "transform 0.2s ease"
element.style.transform = "scale(1.1)";
console.log("Ombre changée !");
}
function reset_fond(element) {
element.style.textShadow = "";
element.style.transform = ""
console.log("Ombre retirée !");
}
for(let i = 0; i != 4; i++) {
boutons[i].addEventListener("mouseover", function() {
change_fond(boutons[i]);
});
boutons[i].addEventListener("mouseout", function() {
reset_fond(boutons[i]);
});
}