使用layer.photos图片放大
发表于:2024-06-29 11:16:03浏览:170次
在后台框架中,我们常常需要全局对图片进行放大,我们可以这样操作
$(document).on('click','img',function (e) {
layer.photos({
photos: {
"title": "", //相册标题
"id": 1, //相册id
"start": 0, //初始显示的图片序号,默认0
"data": [ //相册包含的图片,数组格式
{
"alt": "图片名",
"pid": 1, //图片id
"src": $(this).attr('src'), //原图地址
"thumb": "" //缩略图地址
}
]
}
, anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
})
栏目分类全部>