自定义弹框(手机端),定时消失
生活随笔
收集整理的這篇文章主要介紹了
自定义弹框(手机端),定时消失
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
//文字彈框,1秒后消失 function txt_layer_glo(txt, time) { var txt_layer = " <p class=\"txt_layer\" style=\"position:fixed;z-index:100;left:10%;top:50%;margin-top:-20px; width:80%;text-align:center;line-height:40px;background-color:rgba(0,0,0,.7);color:#fff;border-radius:4px;\">" + txt + "</p>"; if ($("body .txt_layer").length > 0) { $(".txt_layer").show(); $(".txt_layer").text(txt); } else { $("body").append(txt_layer); } setTimeout(function () { $(".txt_layer").hide() }, time); }?
轉載于:https://www.cnblogs.com/LChenglong/p/6756997.html
總結
以上是生活随笔為你收集整理的自定义弹框(手机端),定时消失的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解析html文档的java库及范例
- 下一篇: 生产者-消费者