头条PC端的鼠标经过图片放大效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .con{width:300px;height:300px; border: 1px solid black; overflow: hidden; } .con img{ transition:transform 2s; } .con img:hover{ transform: scale(1.5) } </style> </head> <body> <div class="con"> <img src="img/1.jpg" width="100%" height="100%"> </div> </body> </html>
请爱好前端技术的朋友,联系我,有问题大家一起讨论