transition:
the process or a period of changing from one state or condition to another.
.box{
transition: all 1s ease;
}
transition-property
transition-duration
transition-timing-function
transition-delay
.box{
transition: all 1s ease 1s;
}
.box{
transition: color 1s ease,
background 0.5s ease-in-out;
}
.box{
transition: all 0.4s ease;
}
.box{
transition: all 400ms ease;
}
linear
ease
ease-in
ease-out
ease-in-out
step-start
step-end
transform properties
.box{
transform: transform-value;
}
.box{
transform: translate(30px, 30px);
}
transform: translate(x,y);
transform: translateX(30px);
transform: translateY(30px);
transform: scale(2);
transform: skew(10deg, 20deg);
transform: skewX(10deg);
transform: skewY(20deg);
transform: rotateX(30deg);
transform: rotateY(30deg);
transform: rotateZ(30deg);
@keyframes myAnimation {
from{
opacity: 0;
}
to{
opacity: 1;
}
}
@keyframes myAnimation {
from{
opacity: 0;
background: teal;
}
to{
opacity: 1;
background: slategray;
}
}
@keyframes myAnimation {
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
Web pages do not contain anything that flashes more than three times in any one second period, or the flash is below the general flash and red flash thresholds. (Level A)W3C Recommendation
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-duration
animation-fill-mode
animation-play-state
.box {
animation-name: myAnimation;
animation-duration: 2s;
animation-delay: 1s;
animation-iteration-count: infinite;
animation-direction: normal;
animation-timing-function: ease;
animation-fill-mode: none;
animation-play-state: running;
}
https://css-tricks.com/snippets/css/keyframe-animation-syntax/
.box{
animation: myAnimation 2s 1s normal ease none running ;
}
normal
samt none
är default, behöver egentligen inte skrivas