<! DOCTYPE HTML > < HTML > < head > < Meta charset = "UTF-. 8" > < title > the JS the Bin </ title > < style type = 'text / CSS' > IMG { width : 200px ; height : 200px ; Transition : lS ; } // Transition effect that the time required to specify the state change. IMG: hover { width : 400px ; height :400px;} </style> </head> <body> <img src='http://img.mymhotel.com/front/suprise1209.jpg'> </body> </html>
// we can specify transition applicable properties, such as only suitable for height
transition:1s height;
// source text address: http: //www.ruanyifeng.com/blog/2014/02/css_transition_and_animation.html
Reproduced in: https: //www.cnblogs.com/positive/p/3912694.html