MUI框架,要兑现手势缩放图片,能够运用imageviewer组件来贯彻。代码很简短:

  1. 引入css:

    <link href="assets/css/mui.imageviewer.css" rel="stylesheet" />
    

    jQuery,mui.imageviewer.css能够从MUI的SDK(只怕实例程序)中找到

  2. 引入JS:

    <script src="assets/js/mui.imageViewer.js"></script>
    
  3. 初始化imageViewer组件,类似于jQuery组件:

    var imageViewer = new mui.ImageViewer('img', {
                        dbl: false
                    });
    

     

相关文章