欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

鼠标移动到div上,div中的img放大

发布时间:2023/12/31 编程问答 45 豆豆
生活随笔 收集整理的这篇文章主要介绍了 鼠标移动到div上,div中的img放大 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

<!DOCTYPE html> <html><head> <meta charset="UTF-8" /> <title>鼠标移动到div上,div中的img放大</title> <style>#photo1{overflow: hidden;width: 411px;height: 548px;cursor:pointer;float:left;margin-top: 50px;margin-left: 350px;}#photo2{cursor:pointer;float:right;margin-top: 50px;margin-right: 350px;}img:hover{transition: .5s transform;transform: scale(1.15);}.tupian{width: 411px;height: 548px;}</style> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head> <body> <div id="photo1"> <img class="tupian" src="https://oscimg.oschina.net/oscnet/up-4a0qevvchq1b47hg0cxjhkxxzhn0jf5j" /> </div> <div id="photo2"> <img class="tupian" src="https://oscimg.oschina.net/oscnet/up-4a0qevvchq1b47hg0cxjhkxxzhn0jf5j" /> </div> </body> </html>

 

总结

以上是生活随笔为你收集整理的鼠标移动到div上,div中的img放大的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。