Tramsition and Animation
Tramsition and Animation
&
ANIMATIONS
transition-property
Specifies the name of the CSS property the
transition effect is for.
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition-property: width, height;
}
TRANSITION DURATION
transition-duration
Specifies how many seconds or milliseconds a transition
effect takes to complete
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition-duration: 3s;
}
TRANSITION TIMING FUNCTION
transition-timing-function
Specifies the speed curve of the transition effect.
}
TRANSITION DELAY
transition-delay
Specifies when the transition effect will start.
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition-duration: 3s;
-webkit-transition-delay: 3s;
}
CSS3 ANIMATIONS
div {
width: 100px;
height: 100px;
background-color: red;
-webkit-animation-name: ani;
-webkit-animation-duration: 4s;
}
@-webkit-keyframes ani
{
from {background-color: red;}
to {background-color: yellow;}
}
ANIMATION DELAY