阿灯的个人小站

越努力越幸运~


jquery实现图像缩放功能插件

发布时间:2018-09-28 作者:阿灯 阅读量:115
<script src="https://cdn.bootcss.com/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="jquery.mousewheel.min.js"></script>
    <script type="text/javascript" src="jquery.iviewer.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $("#viewer2").iviewer({
            src: "http://www.cnczsy.com/image/map2.jpg",
            initCallback: function() {
                iviewer = this;
            },
            //onMouseMove: function(object, coords) { },
            //onStartDrag: function(object, coords) { return false; }, //this image will not be dragged
            //onDrag: function(object, coords) { }
        });
    });
    </script>
    <link rel="stylesheet" href="jquery.iviewer.css" />
    <style>
    .viewer {
        width: 700px;
        height: 500px;
        margin: 0 auto;
        border: 1px solid black;
        position: relative;
    }
    .wrapper {
        overflow: hidden;
    }
    </style>
    <div class="wrapper">
        <div id="viewer2" class="viewer"></div>
    </div>



来源:http://www.xwcms.net/js/tpdm/85276.html

下载地址:图像缩放功能插件.rar

标签云

© adeng.y 粤ICP备17049299号
Catfish Blog | 后台