+ 2
How I do that?
is there any way to make this transition happen when the mouse leaves? https://code.sololearn.com/WdDaIicLKgGA/?ref=app
1 Respuesta
+ 2
const h1 = document.getElementsByTagName("h1")[0];
window.onload = () => {
h1.addEventListener("mouseover", Over);
h1.addEventListener("mouseout", Out);
}
Over = () => {
h1.style.color = '#FF0000';
}
Out = () => {
h1.style.color = '#0000FF';
}
https://www.sololearn.com/compiler-playground/Wd8rIP7646Hr