Skip to content

Instantly share code, notes, and snippets.

@AndreaBarghigiani
Last active June 4, 2018 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreaBarghigiani/b67775c6dbd9c2f77b727bcf35ed7cc7 to your computer and use it in GitHub Desktop.
Save AndreaBarghigiani/b67775c6dbd9c2f77b727bcf35ed7cc7 to your computer and use it in GitHub Desktop.
Ecco tutti i blocchi di codice presentati nella terza lezione del corso "Landing page animate con i CSS" https://skillsandmore.org/corso/landing-page-animate-con-i-css/
@keyframes change-background{
from{
background-color: #fff;
}
to{
background-color: #000;
}
}
.box{
animation: change-background 3s;
animation: change-background 3s ease-in;
animation: change-background 3s forwards;
animation: change-background 5s ease-in-out 2s backwards;
animation: 3s linear 5s backwards infinite alternate change-background;
background-color: #FBC02D;
border-radius: 10px;
}
@keyframes change-background{
0%{
background-color: #FF0400;
}
50%{
background-color: #4CAF50;
}
100%{
background-color: #1600EE;
}
}
.box{
...
animation-name: change-background;
}
.box{
...
animation-duration: 600ms;
}
.box{
...
animation-timing-function: ease-in-out;
}
.box{
...
animation-delay: 450ms;
}
.box{
...
animation-iteration-count: 0.5;
}
.box{
...
animation-direction: reverse;
}
.box{
animation:
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
animation-fill-mode
animation-play-state
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment