一,先设置一个扩展变量,弹窗代码:
<dl id="popBox" class="pop">
<dt>
<strong> <font color="red">牢记 网站 回家路永不迷失</font></strong>
</dt>
<dd class="sub-title">正确的网址访问方式:http://xxx.com</dd>
<dd class="sub-title">**移动屏蔽本站,请勿用移动网络访问**</dd>
<dd class="sub-title">如果您记不住本站域名,请收藏本站域名,本站经常会换域名,收藏越多越永久能访问本站</dd>
<dd class="url" onclick="copyUrl('http://www.xxx.com');"><em>https://</em>www.xxx.com</dd>
<dd class="url" onclick="copyUrl('http://www.xxx.com');"><em>https://</em>www.xxx.com</dd>
<dd class="url" onclick="copyUrl('https://如果域名打不开 加上www即可');"><em>如果打不开 请联系客服</em></dd><dd class="all"></dd>
<a onclick="javascript:document.querySelector('.pop').remove()" style="padding: 8px 30px;
background: #2b3655;
color: #fff;
border-radius: 20px;">好的,我记住啦</a>
</dl>
一,扩展变量,新增设置一个开关:
三,底部增加控制代码:
<?
if($public_r[add_open_adsc]==1){
?>
<?=$public_r[add_adsc]?>
<?
}
?>
四,添加CSS代码:
.pop {
position: fixed;
left: 50%;
top: 35%;
margin-left: -160px;
margin-top: -200px;
border-radius: 12px;
width: 320px;
height: 350px;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#212c4b), to(#6f7894));
background: -webkit-linear-gradient(top, #212c4b, #6f7894);
background: -moz-linear-gradient(top, #212c4b, #6f7894);
background: -o-linear-gradient(top, #212c4b, #6f7894);
background: -ms-linear-gradient(top, #212c4b, #6f7894);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#212c4b, endColorstr=#6f7894);
font-size: 14px;
text-align: center;
z-index: 11001;
}
.pop dt {
margin-top: 20px;
line-height: 40px;
font-size: 20px;
color: hsla(0, 0%, 100%, .8);
}
.pop dd {
margin: 13px;
}
.pop .sub-title {
line-height: 26px;
color: hsla(0, 0%, 100%, .5);
}
.pop .url {
cursor: pointer;
margin: 10px 20px;
border-radius: 5px;
padding: 0 10px;
height: 34px;
line-height: 34px;
background: #212c4b;
color: hsla(0, 0%, 100%, .8);
text-transform: lowercase;
}
.pop .url:hover {
background: #151d33;
}
.pop em {
color: #ffbf00;
font-size: 14px;
}
.pop .all {
margin-top: 26px;
text-align: center;
}
.pop .all a {
padding: 8px 30px;
background: #2b3655;
color: #fff;
border-radius: 20px;
}
.pop .all a:hover {
background: #151d33;
}
.pop .btn-close {
margin: 0 auto;
margin-top: 50px;
width: 48px;
height: 48px;
line-height: 48px;
}
.pop .btn-close a {
display: block;
background: rgba(255, 255, 255, .9);
color: hsla(0, 0%, 0%, .6);
font-size: 20px;
text-align: center;
border-radius: 100px;
}