zoukankan      html  css  js  c++  java
  • layer 弹窗经常使用的属性

     layer.open({
                        type: 2, //1(页面层)2(iframe层)3(加载层)4(tips层)
                        title: '测试标题', //不显示标题栏 title:fasle;title: ['文本', 'font-size:18px;']
                        closeBtn: 1, //不显示关闭按钮
                        shade: [0.8, '#393D49'], //0.1透明度的白色背景
                        area: ['800px', '500px'], //可以设置宽高,可以使用px或者百分比% 默认对其方式是水平垂直居中。
                        time: 2000, //2秒后自动关闭
                        anim: 1, //目前anim可支持的动画类型有0-6 如果不想显示动画,设置 anim: -1 即可 默认为0
                        maxmin: true, //该参数值对type:1和type:2有效,默认不显示
                        skin: 'layui-layer-lan', //layui-layer-lan   layui-layer-molv
                        content: ['http://www.baidu.com', 'no'], //iframe的url,no代表iframe页面不显示滚动条
                        cancel: function(index, layero) { //右上角关闭按钮触发的回调   当前层索引参数(index)、当前层的DOM对象(layero)
                            if (confirm('确定要关闭么')) { //只有当点击confirm框的确定时,该层才会关闭
                                layer.close(index)
                            }
                            return false;
                        },
                        end: function() { //层销毁后触发的回调
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-lan', //layui-layer-lan   layui-layer-molv
                                title: '很多时候,我们想最大化看,比如像这个页面。',
                                maxmin: true, //开启最大化最小化按钮
                                area: ['97%', '600px'],
                                content: ['http://www.baidu.com', 'no'], //弹出页面禁止滚动条
                                scrollbar: false // 父页面 滚动条 禁止
                            });
                        }
                    });
  • 相关阅读:
    SQLSERVER跨库访问
    Mybatis开发的几个主要事项
    jqGrid参数
    WPF 从当前层次遍历查找 子控件及父控件
    c# 获取图像像素
    异步FIFO的FPGA实现
    note5文档流
    note3css 的padding属性
    note3clip:rect('top', 'right', 'bottom', 'left')是什么意思
    怎样查看端口被占用情况
  • 原文地址:https://www.cnblogs.com/ximenchuifa/p/14173174.html
Copyright © 2011-2022 走看看