<div class="codetitle"> <span><a style="CURSOR: pointer" data="49940" class="copybut" id="copybut49940" onclick="doCopy('code49940')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code49940"> <br><div class="jqzoom"> <br><img src="http://bfbnews.tw/images/test.jpg" id="bigImg" style="max-width:90%" jqimg="http://bfbnews.tw/images/test.jpg" alt="jquery图片放大功能简单实现_jquery" > <br> </div> <br><script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <br><style type="text/css"> <BR>body{margin:0px;} <BR>div.zoomdiv { <BR>z-index: 999; <BR>position : absolute; <BR>top:0px; <BR>left:0px; <BR>width : 200px; <BR>height : 200px; <BR>background: #ffffff; <BR>border:1px solid #CCCCCC; <BR>display:none; <BR>text-align: center; <BR>overflow: hidden; <BR>} <BR>div.jqZoomPup { <BR>z-index : 999; <BR>visibility : hidden; <BR>position : absolute; <BR>top:0px; <BR>left:0px; <BR>width : 50px; <BR>height : 50px; <BR>border: 1px solid #aaa; <BR>background: #ffffff; <BR>opacity: 0.5; <BR>-moz-opacity: 0.5; <BR>-khtml-opacity: 0.5; <BR>filter: alpha(Opacity=50); <BR>} <BR></style> <br><script type="text/javascript"> <BR>$(document).ready(function(){ <BR>$(".jqzoom").jqueryzoom({ <BR>xzoom: 400, //设置放大 DIV 长度(默认为 200) <BR>yzoom: 400, //设置放大 DIV 高度(默认为 200) <BR>offset: 10, //设置放大 DIV 偏移(默认为 10) <BR>position: "right", //设置放大 DIV 的位置(默认为右边) <BR>preload:1, <BR>lens:true <BR>}); <BR>}); <BR></script> <br><!--{include file="jqzoom_js.html"}--> <br> </div>