.dialog { top:0; left:0; right:0; bottom:0; color:gray; position:fixed; margin:20px auto; line-height:60px; transition:all 0.5s; text-align:center; border-radius:5px; border:1px solid #e0e0e0; box-shadow:0 0 6px 0 #000; opacity:0; } .dialog::before,.dialog::after { content:''; position:absolute; width:50px; height:50px; background-size:cover; top:5px; left:5px; } /*在下面url里面可以自定义添加图标,因为上传的时候我不知道怎么传图片*/ .dialog[type="success"]::before { background-image:url("./image/success.png"); } .dialog[type="error"]::before { background-image:url("./image/error.png"); } .dialog[type="tip"]::before { background-image:url("./image/tip.png"); }
更新时间:2021-03-01 10:36:26