<!DOCTYPE html> <html> <head> <style> .div-transition2{ width: 100px; height: 100px; background: yellow; -webkit-transition: width 2s, height 4s; /* For Safari 3.1 to 6.0 */ transition: width 2s, height 4s; } .div-transition2:hover { background-color: blue; width: 300px; height: 300px; } </style> </head> <body> <h1>The transition Property</h1> <div class="div-transition2"></div> </body> </html>