layer 弹出层不能居中

$("#btnAdd").button("loading");
                parent.layer.open({
                    title: '添加菜单',
                    type: 2,
                    maxmin: true,
                    anim: 3,
                    offset: ['10%', '10%'],//设置位移
                    content: ["@Url.Action("Add")", 'no'],
                    area: ['80%', '80%']//设置相对于父页面的大小
                });

 这个方法比较笨,希望有解决的人告诉我,更合理的方案

原文地址:https://www.cnblogs.com/bamboo-zhang/p/9350567.html