JS_0004:JQuery 创建按钮 添加样式,和 事件的快捷方法

        $('<div class="close"></div>')
            .css({
                "width":"10%",
                "height":"10%",
                "bottom":"5%",
                "right":"5%",
                "z-index":9999,
                "position":"absolute",
                "background-size":"contain",
                "background-repeat":"no-repeat",
                "background-position":"bottom right",
                "background-image":"url('data:image/png;base64,')",
              })
            .appendTo('body').on('click', function () {
                window.close();

            });

猜你喜欢

转载自www.cnblogs.com/eliteboy/p/12973707.html
今日推荐