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
})