图片放大镜插件-MLENS

所属分类:媒体-图像

 35916  313  查看评论 (2)
分享到微信朋友圈
X
图片放大镜插件-MLENS ie兼容6

mlens是一款优秀的图片放大镜插件

使用步骤

1、引入以下的js和css文件

<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.mlens-1.0.min.js"></script>


2、在head标签中加入以下js代码

<script type="text/javascript">
$(document).ready(function()
{
    $("#green_monster").mlens(
    {
        imgSrc: $("#green_monster").attr("data-big"),   // path of the hi-res version of the image
        lensShape: "circle",                // shape of the lens (circle or square)
        lensSize: 180,                  // size of the lens (in px)
        borderSize: 4,                  // size of the lens border (in px)
        borderColor: "#fff",                // color of the lens border (#hex)
        borderRadius: 0                 // border radius (optional, only if the shape is square)
    });
});
</script>


3、在body标签中加入以下格式的html代码


<img id="green_monster" src="images/GreenMonster_640px.jpg" alt="green monster graffiti by Kotzian" data-big="images/GreenMonster_1280px.jpg">
相关插件-图像

html5前端图片压缩

html5前端图片压缩
  图像
 84229  454

jQueryphotoClip图片剪裁插件

jQueryphotoClip是一款支持移动设备触摸手势的图片裁剪jQuery插件。
  图像
 80006  418

橡皮擦--图片擦除效果

电脑端、移动端(Android、ios等)都可适应!
  图像
 50836  443

移动端图片滤镜效果

在手机上常用到的图片滤镜效果
  图像
 28168  385

讨论这个项目(2)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    0
    2017/12/1 15:13:20

    不错。总算找着个真正能用的。给外层div加个relative就可以控制位置了。

    回复
    〆过不去的,都已过去ミ 0
    2015/11/24 11:11:05

    图片的大小必须按照你的图片大小来吗

    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复