Hover over the div element above, to see the transition effect.

div { width: 100px; height: 50px; background: green; -webkit-transition: width 2s; /* For Safari 3.1 to 6.0 */ transition: width 2s; } div:hover { width: 300px;