Monday 26 December 2011

Styling the Box: Transition

Styling the Box: Transition

 If the instructed element have any changes to their state, then the change can possible by  transition (transition: all 1s).

Syntax: css

 .box { 
 background: #e3e3e3; 
 border: 1px dashed #666; 
 margin: auto; 
 width: 400px; 
 height: 200px; 
 cursor: pointer; 
 position: relative; 
 -webkit-transition: all 1s; 
 -moz-transition: all 1s; 
 transition: all 1s; 
 } 


HTML:

<body>
 <div class="box"> 
 <div>Hello</div> 
 <div> World </div>
 </div>
 </body>

No comments:

Post a Comment