viewer.js的应用

1、引入

下载cnpm i viewerjs -S并引入css与js

2、new Viewer(DOM节点,{配置属性}),例:

属性只能查文档:(https://github.com/fengyuanchen/viewerjs/blob/master/README.md)

new Viewer(document.getElementById('aaa'),{
  button:true,
  navbar:false,
  title:true,
  toolbar:true,
  tooltip:true,
  movable:true,
  zoomable:true,
  rotatable:true,
  scalable:true,
  transition:true,
  fullscreen:true,
  keyboard:true,
  backdrop:true,
  loop:true,
  loading:true
})

 

posted @ 2018-04-03 17:03  风在吹,雪纷飞  阅读(2197)  评论(0编辑  收藏  举报