分享一个美观的js代码/网站正中间展示/引流弹窗刷新弹一次
分享一个美观的js代码/网站正中间展示/引流弹窗刷新弹一次代码如下:
<font color>
<style>
.noticeFixedBox{width:300px;height:400px;position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);display: none;z-index: 999999999999999999;border: 1px solid #ccc;box-shadow: 0 0 5px rgba(0,0,0,0.3);background: #fff;line-height: 20px;}
.noticeFixedBox .nfbContent{font-size: 12px;line-height: 20px;color: #f00;text-align: center;padding: 15px;}
.noticeFixedBox .nfbContent h6{font-size: 24px;text-decoration: underline;margin: 0 0 15px 0;}
.noticeFixedBox .nfbContent p{margin: 0;}
.noticeFixedBox .nfbContent a{color: #f00!important;text-decoration: underline;font-weight: bold;font-size: 14px;}
.noticeFixedBox .nfbClose{background: #f00;color: #FFF;position: absolute;width: 30px;height: 30px;text-align: center;line-height: 30px;color: #fff;top: -10px;right: -10px;border-radius: 50%;cursor: pointer;z-index: 1000;}
</style>
<div class="noticeFixedBox" id="noticeFixedBox" style="display: block;">
<div class="nfbClose" >X</div>
<div class="nfbContent">
<h6>紧急通知</h6>
<p>最近防火墙全面升级,所有影视站点都在经历不同程度的屏蔽。若你暂时无法访问,请稍后再试,我们会一直陪伴你到最后!</p>
<p>请立即下载我们的安卓客户端,能防止各种屏蔽,让你随时找回回家的路!</p>
<p><a target="_blank" href="https://" >网址</a>
<p><img src="图片
" > </p>
<p>请务必下载安卓客户端,随时能找到回家的路!</p>
</div>
</div>
</font>
<script>
showNoticeFixedBox();
function closeNoticeFixedBox() {
sessionStorage.setItem("flagNoticeFixedBox", 1);
document.getElementById('noticeFixedBox').style.display='none';
}
function showNoticeFixedBox() {
if(sessionStorage.getItem('flagNoticeFixedBox') == 1){}else{document.getElementById('noticeFixedBox').style.display='block';}
}
</script>
样式如下:美观简洁大方
感谢楼主分享
页:
[1]