<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: green; -webkit-transition: width 2s; /* For Safari 3.1 to 6.0 */ transition: width 2s; } div:hover { width: 300px; } </style> </head> <body> <h1>The transition Property</h1> <div></div> </body> </html>