本文实例讲述了jQuery实现为图片添加镜头放大效果的方法。分享给大家供大家参考。具体如下:
运行效果如下图所示:
主要代码如下:
?
1 2 3 4 5 6 $(function () { $("#img_01").imageLens(); $("#img_02").imageLens({ lensSize: 200 }); $("#img_03").imageLens({ imageSrc: "images/sample01.jpg" }); $("#img_04").imageLens({ borderSize: 8, borderColor: "#06f" }); });希望本文所述对大家的jQuery程序设计有所帮助。