图片放大镜实例

点击这里查看效果
http://keleyi.com/keleyi/phtml/jqtexiao/18.htm
效果图:
图片放大镜实例_第1张图片


js插件:

<script type="text/javascript" src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://keleyi.com/keleyi/phtml/jqtexiao/18/jquery.enlarge.js"></script>

 html代码:

<div style="width: 986px; margin: 0px auto;">
<div><h3>图片放大镜</h3>把光标移动到下面图片上 <a href="http://keleyi.com/a/bjad/q2ee2xyt.htm" target="_blank">原文</a></div>
<a href="http://keleyi.com/image/a/5nxma18i.jpg" id="demo" style="position: relative; float: left;">
<img src="http://keleyi.com/image/a/qsqtberv.jpg" width="240" height="180" alt="小图">
<img src="http://keleyi.com/image/a/5nxma18i.jpg" width="960" height="720" style="display: none;" alt="大图">
</a>
</div>

 javascript代码:

<script type="text/javascript">
//柯乐义 http://keleyi.com
$(function () {
$("#demo").enlarge(
{
// 鼠标遮罩层样式
shadecolor: "#FFD24D",
shadeborder: "#FF8000",
shadeopacity: 0.4,
cursor: "move",

// 大图外层样式
layerwidth: 480,
layerheight: 360,
layerborder: "#DDD",
fade: true,

// 大图尺寸
largewidth: 960,
largeheight: 720
});
});

</script>

 

 原文:http://keleyi.com/a/bjad/q2ee2xyt.htm

http://ini.iteye.com

你可能感兴趣的:(JavaScript,jquery,css,Web综合,界面设计)