网站弹窗公告代码
分享一段网站弹窗公告的html代码,我们站长如果想要在自己网站通知消息的话,但是又没有自带的通知功能,就可以使用这段网站弹窗公告的代码,这段代码是纯html,有了这个弹窗公告代码,可以极大的方便我们通知消息给网站用户,而且弹窗效果非常好看。
只需要把下面这段代码放到网站首页,或者其他任意界面的</body>标签前面,就可以实现提示弹窗公告,只要有用户访问带有这段公告代码的页面,就会提示并显示我们设定好的通知内容,用户关闭弹窗之后就可以像平时一样正常访问浏览我们的网页,虽然使用方法比较简单,但是对于有需要的我们来说可以产生很大的便利性。
<!-- 弹窗代码开始 --> <div class="web_notice" style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0,0,0,0.3);z-index: 99999;"> <div style="position: fixed;top: 50%;left: 50%;width: 550px;background: #FFF;transform: translate(-50%, -50%);border-radius: 40px;padding: 50px 40px;"> <h3 style="font-weight: bold;text-align: center;font-size: 30px; ">网站通知</h3><div style="font-size: 16px;margin-top: 26px;line-height: 30px;color: #999; ">二狗资源网测试弹窗</div><a style="display: block;background: #98a3ff;color: #FFF;text-align: center;font-weight: bold;font-size: 19px;line-height: 60px;margin: 0 auto;margin-top: 45px;border-radius: 32px;width: 80%;" onclick="javascript:document.querySelector('.web_notice').remove()">我知道了</ a></div></div> <!-- 弹窗代码结束 -->
发表评论