<img class="imgs" src="路径" style="width:100px;float:left">
$(".imgs").click(function(){
var img_url=$(this).attr('src');
layer.open({
type: 1,
shade: false,
//area:["800px","600px"],
title: false, //不显示标题
content:"<img style='width:100%;height:100%' src='"+img_url+"'>", //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
cancel: function(){
// layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
}
});
});