i

Learn HTML and CSS in 10 Days

CSS Transition

The CSS transitions are effects that help in adding elements from one style to another without the help of JavaScript or flash. One needs to tell two things to make a CSS transition.

  • The CSS property on which the effect needs to be applied.

  • The effect’s time duration.

div{

width: 90px; 

height: 90px; 

background: orange; 

    -webkit-transition: width 1s; /* For Safari 3.1 to 6.0 */ 

transition: width 1s; 

div:hover { 

width: 300px;