Transaction Effect In CSS3

CSS3 transitions are effects that are used to change from one style to another. It specify two things:
First the CSS property which we want to add an effect to
Second the duration of effect.

<html>
<head>
<style type="text/css"> 
div
{
width:100px;
height:100px;
background:red;

transition:width 2s;
-moz-transition:width 2s; /* Firefox 4 */
-webkit-transition:width 2s; /* Safari and Chrome */

}

div:hover
{
width:300px;
background:pink;

}
</style>
</head>
<body>


<div></div>



</body>
</html>