The list below will help add css animations to your page and give it some extra flair.
Copy and paste these approved code snippets into the CSS portion of the Dev Tools. Then, apply the class name (minus the ".") to buttons, images, and other elements/blocks via the "Custom Classes" input within the "Properties" Tab.
Remember to Save the modal, and Save the page, before you refresh to see your animation in action!
.underline {
display: inline-block;
position: relative;
color: hsl(0, 0%, 0%);
}
.underline::after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 1px;
bottom: 0;
left: 0;
background-color: hsl(0, 0%, 0%);
transform-origin: bottom right;
transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.underline:hover::after {
transform: scaleX(1);
transform-origin: bottom left;
}
/*
var leftgear = document.getElementsByClassName("leftturn"),
rightgear = document.getElementsByClassName("rightturn");
window.addEventListener("scroll", function() {
document.getElementsByClassName("leftturn").style.transform = "rotate("+window.pageYOffset+"deg)";
document.getElementsByClassName("rightturn").style.transform = "rotate(-"+window.pageYOffset+"deg)";
});
*/
Â
window.addEventListener('scroll', () => {
document.body.style.setProperty('--scroll',window.pageYOffset / (document.body.offsetHeight - window.innerHeight));
}, false);