---- AI试用 ---域名问题某些图片和js资源无法访问,导致一些代码实例无法运行!(代码里gzui.net换成momen.vip即可)

钟哥更改alert提示样式

前端开发 蚂蚁 5343℃ 0评论
.alert_box{position:fixed;top:46%;width:100%;z-index:1001;display:none;}
    .alert_box .alert_body{width:500px;margin:0 auto;background:#fff;text-align: center;border:1px solid #ddd;box-shadow: 0 2px 5px rgba(0,0,0,.3);border-radius: 4px;padding:10px 5px;font-size:1.8em;font-weight:bold;}
var Alert_Box = (function () {
            var box = null,lock=false, array = [];
            function Show(message) {
                if (box == null) {
                    box = $('
'); $(document.body).append(box); } if (message == null) { message = array.shift(); if (!message) { return;} } else if (lock) { array.push(message); return; } lock = true; box.find('.alert_body').html(message); box.slideDown('fast'); setTimeout(Hide, 2000); } function Hide() { box.slideUp('fast', function () { lock = false; if (array.length > 0) { Show(null); } }); } return Show; })();

提示:你可以先修改部分代码再运行。

转载请注明:有爱前端 » 钟哥更改alert提示样式

喜欢 (0)or分享 (0)

(8)个小伙伴在吐槽
  1. 弹窗http://saribe.github.io/eModal/#demo
    蚂蚁2016-01-21 09:01
  2. https://myclabs.github.io/jquery.confirm/
    朽木2016-02-29 09:23
  3. http://git.oschina.net/ydq/alertjs
    一个好人2016-05-30 09:04
  4. http://runjs.cn/code/plegszvw
    一个好人2016-05-31 09:48
  5. https://github.com/t4t5/sweetalert
    蚂蚁2016-08-19 11:12
  6. http://www.dglives.com/demo/sweetalert-master/example/
    蚂蚁2016-11-07 16:24
  7. http://t4t5.github.io/sweetalert/
    朽木2017-01-12 16:15
  8. https://github.com/sweetalert2/sweetalert2
    蚂蚁2019-11-25 15:44