JS部分

<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>

<script type="text/javascript">

jQuery(document).ready(function ($) {
if (window.history && window.history.pushState) {
$(window).on('popstate', function () {
var hashLocation = location.hash;
var hashSplit = hashLocation.split("#!/");
var hashName = hashSplit[1];
if (hashName !== '') {
var hash = window.location.hash;
if (hash === '') {
//alert("希望该网站能提供你帮助!");
$('.onunload-box').css('display', 'inline');
$('.zhezhao').css('display', 'inline');
}
}
});
window.history.pushState('forward', null, './#forward');
}
}); $('.colsebtn').click(function(){
$('.onunload-box').css('display', 'none');
$('.zhezhao').css('display', 'none');
})
//点击遮罩部分,关闭弹框
$('.zhezhao').click(function(){
$('.onunload-box').css('display', 'none');
$('.zhezhao').css('display', 'none');
}) $('.bottom-box').click(function(){
$('.onunload-box').css('display', 'inline');
$('.zhezhao').css('display', 'inline');
}); </script>

CSS部分

        .onunload-box{
width:400px;
height:268px;
border:1px #ad1d1d solid;
border-radius: 20px;
text-align: center;
position: fixed;
top:50%;
margin-top:-134px;
left:50%;
margin-left:-200px;
z-index:;
background-color: #fff;
padding:12px 24px 0;
color:#732205;
}
.btns{
height:100px;
width:100%;
border-top:1px #ad1d1d solid;
position: absolute;
bottom:-50px;
left:;
}
.colsebtn{
width:150px;
float:left;
line-height: 50px;
cursor:pointer;
}
.wxgghbtn{
width:256px;
height:50%;
line-height: 50px;
position:absolute;
right:;
background-color:#ad1d1d;
color:#fff;
border-bottom-right-radius: 20px;
}
.wxgghbtn>a{text-decoration: none;color:#fff;}
.p1{font-size:16px;margin-top:}
.p2{font-size:14px;color:#333;margin:0px;}
.p4{font-size:32px;font-weight: bold;margin:0px;}
.zhezhao
{
width:100%;
height:100%;
background-color:#000;
filter:alpha(opacity=60);
-moz-opacity:0.6;
opacity:0.6;
position:fixed;
left:0px;
top:0px;
display:none;
z-index:;
}

HTML部分

     <div class='zhezhao'></div>
<div class='onunload-box' style='display:none'>
<p class='p1'>和田玉怎么鉴定的?你知道的和田玉是什么样的</p>
<p class='p2'>据统计,大部分的人都不知道和田玉石如何鉴定的。<br/><br/>鼎石专家教你如何鉴定和田玉小妙招</p>
<p class='p3'>添加鼎石和田玉为公众号好友,专家教您鉴赏和田玉</p>
<p class='p4'><script>document.write(stxlwx);</script></p>
<p class='p5'>先长按上方公众号直接复制</p>
<div class='btns'>
<div class='colsebtn'>谢谢,我不需要</div>
<div class='wxgghbtn' data-clipboard-target='.p4'>关注微信公众号,以后用得着</div>
       </div>
</div>

最新文章

  1. 25个实用的jQuery技巧和解决方案
  2. Test Design Guidelines for Reusability
  3. LigerUi框架+jquery+ajax无刷新留言板系统的实现
  4. JAVA同步容器和并发容器
  5. PetaPoco 使用总结(一)
  6. jQuery数据类型总结
  7. POJ-1155 TELE (树形DP+分组背包)
  8. fastjson生成和解析json数据
  9. MVC+Ef项目(1) 项目的框架搭建
  10. asp.net mvc3+EF4.1项目实战
  11. SVN安装和使用(简单版)
  12. VUE 安装及项目创建
  13. mysql 数据可视化操作---Navicat安装及简单使用
  14. 如何使用 Yum Repository 安装指定版本的 MySQL
  15. 【Zookeeper系列】ZooKeeper安装配置(转)
  16. Python面向对象编程(下)
  17. python之进程(multiprocess)
  18. leetcode — longest-substring-without-repeating-characters
  19. android 不同Activity之间数据传递
  20. MySql数据库表操作(二)

热门文章

  1. 微生物组学数据分析工具综述 | 16S+宏基因组+宏病毒组+宏转录组--转载
  2. 2.nginx配置教程
  3. Gson如何解析key值是数字的json数据
  4. JQUERY的属性进行操作
  5. 7.1 通用的职责分配软件原则 GRASP原则一: 创建者 Creator
  6. 在idea中用tomcat远程部署调试
  7. 修改Anaconda3中jupyter的工作目录
  8. python----集合用法总结
  9. 配置Beyond Compare作为比较和合并工具
  10. linux timing profile