CSS -Animationen
Here a codePen with cool animations:
https://codepen.io/DevLorenzo/pen/ExgpvJM
DevLorenzo
Here a codePen with cool animations:
https://codepen.io/DevLorenzo/pen/ExgpvJM
#anim {
animation-name: colorful;
animation-duration: 3s;
}
@keyframes colorful {
0% {
background-color: blue;
}
100% {
background-color: yellow;
}
}
.wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh
}
.pulse {
width: 70px;
height: 70px;
background-color: red;
border-radius: 50%;
position: relative;
animation: animate 3s linear infinite
}
Read this helpful, short and straightforward article to learn CSS animation perfectly.
https://medium.com/@Cafe_Code/learn-css-animation-asap-as-simple-as-possible-374b7874d4dd
body{
background-color: purple;
}
@keyframes party{
0% {background-color: red;}
10% {background-color: orange;}
20% {background-color: yellow;}
30% {background-color: green;}
40% {background-color: blue;}
50% {background-color: purple;}
}
@-webkit-keyframes party{
0% {background-color: red;}
10% {background-color: orange;}
20% {background-color: yellow;}
30% {background-color: green;}
40% {background-color: blue;}
50% {background-color: purple;}
}
window.addEventListener('scroll', () => {
document.body.style.setProperty('--scroll',window.pageYOffset / (document.body.offsetHeight - window.innerHeight));
}, false);