首页 > 代码库 > 鼠标移到图片放大效果

鼠标移到图片放大效果

鼠标移到图片放大效果

 <!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>Title</title>    <style>        * { margin:0; padding:0;}        body { background:#000;}        #container { width:1000px; margin: 50px auto;}        #container .icon { float:left; padding:5px; border:1px solid #fff; border-radius:5px; margin:5px; overflow: hidden;}        .icon img { width:300px; height:200px;  transition: .5s;}        .icon img:hover { transform: scale(1.2); transition: .5s;}    </style></head><body>    <div id="container">        <div class="icon"><img src="http://e.hiphotos.baidu.com/image/pic/item/0df431adcbef7609c7e54a962cdda3cc7dd99ec9.jpg" alt=""></div>        <div class="icon"><img src="http://d.hiphotos.baidu.com/image/pic/item/b21c8701a18b87d6dcf88618050828381f30fd7b.jpg" alt=""></div>        <div class="icon"><img src="http://e.hiphotos.baidu.com/image/h%3D360/sign=011f56749058d109dbe3afb4e158ccd0/b7fd5266d016092477539711d60735fae6cd3441.jpg" alt=""></div>    </div></body></html>

 

鼠标移到图片放大效果