帮助中心

首页 » 拓扑天然气收费系统 » 网页管理端 » layer插件如何弹出自定义div
admin - 2020/3/12 9:58:48
<!DOCTYPE HTML><html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="jquery-1.9.1.min.js"></script>
        <script src="layer/layer.js"></script>

        <script>
            $(function () {
                $("a").click(function () {
                    layer.open({
                        type: 1,
                        closeBtn: false,
                        shift: 2,
                        shadeClose: true,
                        content: $("#box1")
                    });
                })
            })
        </script>

        <style>
            *{padding:0; margin: 0;}
            #box1{width:555px; height:600px; background: #eee; display:none;}
        </style>
    </head>
    <body>
        <a href="#">点击</a>
        <div id="box1">
            111
        </div>
    </body>
</html>
1
查看完整版本: layer插件如何弹出自定义div