<div >原图片<img src="XXXX" id="img" style="width: 100px;height: 100px"></div>
$("#img").click(function () {
//弹出层
layer.open({
//type: 1,
title: '查看图片',
area: ['80%', '80%'],
content:'<img src="'+imgUrl+'" id="img1">',
success: function () {
var current = 0;
$(document).on("click","#img1",function(){
//document.getElementById('img1').onclick = function(){
//图片旋转
current = (current+90)%360;
this.style.transform = 'rotate('+current+'deg)';
// };
});
}
});
});