- jquery mouse hover on the image after the image magnification, that is, the mouse moved to the image of the highlight, the mouse moved back to the original appearance, you can add this effect in the picture scrolling effects, I believe it will be more dazzling.
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title>jquery mouse hover picture amplification effect </title>
<script src= "/ajaxjs/jquery-1.9.1.min.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
$ (function () {
var imgwid = 0;
var Imghei = 0; Variable initialization
var big = 1.2;//Magnification
$ (". Banimg li"). Hover (function () {
$ (this). FIND ("img"). Stop (True,true);
var ImgWid2 = 0;var ImgHei2 = 0;//local variable
Imgwid = $ (this). FIND ("img"). width ();
Imghei = $ (this). FIND ("img"). Height ();
ImgWid2 = Imgwid * BIG;
ImgHei2 = Imghei * BIG;
$ (this). FIND ("img"). CSS ({"Z-index": 2});
$ (this). FIND ("img"). Animate ({"width": imgWid2, "height": imgHei2, "Margin-left":-IMGWID2/2, "margin-top":-IMGHEI2/2 });
},function () {$ (this). FIND ("img"). Stop (). Animate ({"width": imgwid, "height": Imghei, "Margin-left":-IMGWID/2, " Margin-top ":-IMGHEI/2," Z-index ": 1});
})
</script>
<style type= "Text/css" >
*{margin:0; padding:0; list-style:none;}
. banimg{width:600px;height:200px; margin:20px Auto;}
. banimg li{width:200px; height:200px; float:left; position:relative;}
. banimg Li img{width:200px; height:200px; position:absolute; Left:50%;top:50%;margin: -100px 0 0-100px;z-index:1;}
</style>
<body>
<ul class= "Banimg" >
<li><a href= "#" ></a></li>
<li><a href= "#" ></a></li>
</ul>
</body>
jquery mouse hover picture enlarged display