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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-12-06
  • 2021-05-20
  • 2022-12-23
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案