Just copy the code
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> div { width: 100px; height: 100px; background: red; -webkit-transition: width 2s, height 2s, -webkit-transform 2s; /* For Safari 3.1 to 6.0 */ transition: width 2s, height 2s, transform 2s, background 1s; } div:hover { width: 200px; height: 200px; background:blue; -webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */ transform: rotate(180deg); } </style> </head> <body> <p><b>Note:</b> This instance will not work on Internet Explorer 9 and earlier versions of IE. </p> <div> Move the mouse over the div element to see the transition. </div> </body> </html>
The effect is as follows
To add multiple styles of transformation effects, the added attributes are separated by commas