Viewer.js 是一款强大的 jQuery 图像浏览插件。

https://blog.csdn.net/qq_29132907/article/details/80136023

一、效果图

二、代码

<!DOCTYPE html><html ><head> <meta charset="UTF-8"> <title>Document</title> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" > <link rel="stylesheet" href="viewer.min.css"> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="viewer.min.js"></script> <style type="text/css"> .outer{ width: 500px; height: 500px; margin: 0 auto; } img{ width:100%; height: 400px; } </style></head><body> <!-- <div class="outer"> <ul });

名称 类型 默认值 说明inline 布尔值 false 启用 inline 模式button 布尔值 true 显示右上角关闭按钮(jQuery 版本无效)navbar 布尔值/整型 true 显示缩略图导航title 布尔值/整型 true 显示当前图片的标题(现实 alt 属性及图片尺寸)toolbar 布尔值/整型 true 显示工具栏tooltip 布尔值 true 显示缩放百分比movable 布尔值 true 图片是否可移动zoomable 布尔值 true 图片是否可缩放rotatable 布尔值 true 图片是否可旋转scalable 布尔值 true 图片是否可翻转transition 布尔值 true 使用 CSS3 过度fullscreen 布尔值 true 播放时是否全屏keyboard 布尔值 true 是否支持键盘interval 整型 5000 播放间隔,单位为毫秒zoomRatio 浮点型 0.1 鼠标滚动时的缩放比例minZoomRatio 浮点型 0.01 最小缩放比例maxZoomRatio 数字 100 最大缩放比例zIndex 数字 2015 设置图片查看器 modal 模式时的 z-indexzIndexInline 数字 0 设置图片查看器 inline 模式时的 z-indexurl 字符串/函数 src 设置大图片的 urlbuild 函数 null 回调函数,具体查看演示built 函数 null 回调函数,具体查看演示show 函数 null 回调函数,具体查看演示shown 函数 null 回调函数,具体查看演示hide 函数 null 回调函数,具体查看演示hidden 函数 null 回调函数,具体查看演示view 函数 null 回调函数,具体查看演示viewed 函数 null 回调函数,具体查看演示 --------------------- 作者:唐策 来源:CSDN 原文:https://blog.csdn.net/qq_29132907/article/details/80136023 版权声明:本文为博主原创文章,转载请附上博文链接!