layui点击放大图片

//原图片
<img src="@(Model.Img)" style=" 100px; height: 100px;" onclick="amplificationImg('@(Model.Img)')" />
//放大的图片
<img alt="" style="display:none;500px;height:500px;" id="displayImg" src="" />
<script>
    function amplificationImg(url) {
        $("#displayImg").attr("src", url);
        layer.open({
            type: 1,
            title: false,
            closeBtn: 1,
            shadeClose: true,
            area: ['630px','600px'], //宽高
            content: "<img src=" + url + " style=' 500px; height: 500px;' />"
        });
    }
</script>
原文地址:https://www.cnblogs.com/LiChen19951127/p/13826615.html