2d transform
Ale Davila
example code:
#oil, #moon, #rabbit {
transition: 0.5s;
}
#oil:hover {
transform: rotate(45deg);
}
example code:
#oil, #moon, #rabbit {
transition: 0.5s;
}
#oil:hover {
transform: rotate(45deg);
}
example code:
#oil, #moon, #rabbit {
transition: 0.5s;
}
#oil:hover {
transform: rotate(45deg);
}
example code:
/* CSS: */
#oil, #moon, #rabbit {
transition: 0.5s;
}
.moveright {
transform: translateX(700px);
}
/* JS: */
//create selector
let rabbit = document.querySelector("#rabbit");
rabbit.addEventListener('click', function (event) {
this.classList.toggle('moveright');
})