html 中手写阴影弹窗框封装

// 弹出提示框
function popup(pWidth,content)
    {    
        $("#msg").remove();
        var html ='<div id="msg" style="position:fixed;top:5%;100%;height:30px;line-height:30px;margin-top:-15px;"><p style="background:#000;opacity:0.8;'+ pWidth +'px;color:#fff;text-align:center;padding:10px 10px;margin:0 auto;font-size:12px;border-radius:4px;">'+ content +'</p></div>'
                $("body").append(html);
                var t=setTimeout(next,2000);
                function next()
                {
                    $("#msg").remove();
                    
                }
    }
原文地址:https://www.cnblogs.com/panax/p/11150461.html