layer.open自定义弹出位置


fixed:false,设置top才有效,待测试。

 这个设置不起作用

                var img = "<img src=\"/_temp/qrcodenet/m/book/book20754.png\" alt=\"test\" style=\"padding:13px;\" />";
                layer.open({
                    type: 1,
                    title: "test",
                    closeBtn: 1,
                    area: ['420px', '200px'],
                    scrollbar: false,
                    //skin: 'layui-layer-nobg',
                    //skin: 'layui-layer-rim',
                    skin: 'layui-layer-rim my-layer1',
                    shadeClose: true,
                    content: img,
                    fixed:false,
                    top:10,
                    end: function () {
                    }
                });

 下边设置起作用

var img = "<img src=\"/_temp/qrcodenet/m/book/book20754.png\" alt=\"test\" style=\"padding:13px;\" />";
                layer.open({
                    type: 1,
                    title: "test",
                    closeBtn: 1,
                    area: ['420px', '200px'],
                    scrollbar: false,
                    //skin: 'layui-layer-nobg',
                    //skin: 'layui-layer-rim',
                    skin: 'layui-layer-rim my-layer1',
                    shadeClose: true,
                    content: img,
                    offset: '10px',
                    //offset: ['100px', '200px'],
                    end: function () {
                    }
                });

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM