倒计时拉幕广告,对联广告效果-23

  1 <!--拉幕广告-->
  2 <style type="text/css">
  3 /* advbox */
  4 *html,*html body{background-image:url(about:blank);background-attachment:fixed;}
  5 *html .advbox{position:absolute;top:expression(eval(document.documentElement.scrollTop));}
  6 .advbox{width:1190px;position:fixed;display:none;left:50%;top:0;margin:-200px 0 0 -595px;}
  7 .advbox .advpic{position:relative;height:450px;overflow:hidden;}
  8 .advbox .advpic .closebtn{display:block;width:60px;height:26px;line-height:26px;font-size:12px;color:#fff; text-align:center;overflow:hidden;position:absolute;right:8px;top:5px;z-index:99; cursor:pointer; background:#000;opacity:0.8; filter:alpha(opacity=80);-moz-opacity:0.8;}
  9 .advbox .advpic .ad_time{display:block;width:180px;height:26px;line-height:26px;font-size:12px;color:#fff; text-align:center;overflow:hidden;position:absolute;left:8px;top:5px;z-index:99; cursor:pointer; background:#000;opacity:0.8; filter:alpha(opacity=80);-moz-opacity:0.8;}
 10 .advbox .advpic .ad_time strong{
 11         width: 20px;
 12         display: inline-block;
 13         text-align: center;
 14         font-family: georgia;
 15         color: #fff;
 16     }    
 17 .bg1_1{ width:1200px; height:500px; background:#f2f2f2; margin:0 auto;}    
 18 .bg1_2{ width:1200px; height:500px; background:#ffefee; margin:0 auto;}
 19 .bg1_3{ width:1200px; height:500px; background:#ededed; margin:0 auto;}
 20     
 21 </style>
 22 
 23 <div class="bg1_1"></div>
 24 <div class="bg1_2"></div>
 25 <div class="bg1_3"></div>
 26 
 27 
 28 <div class="advbox">
 29     <div class="advpic">
 30         <a href="http://info.machine.hc360.com/zt/zzwl/index.shtml" target="_blank"><img width="1190" height="450" src="http://www.hc360.com/dx/images/gg1.png"/></a>
 31         <div href="javascript:void(0);" class="closebtn">关闭</div>
 32        <div class="ad_time"> 广告时间还剩<strong class="a">10</strong><strong class="b"></strong>毫秒</div>
 33     </div>    
 34 </div>
 35 
 36 
 37 
 38 <script src="https://b2b.hc360.com/2019/js/jquery-1.10.2.min.js"></script>
 39 <script type="text/javascript">
 40     $(document).ready(function() {
 41         var times = 5 * 100; // 60秒
 42         countTime = setInterval(function() {
 43             times = --times < 0 ? 0 : times;
 44             var ms = Math.floor(times / 100).toString();
 45 
 46             if(ms.length <= 1) {
 47                 ms = "0" + ms;
 48             }
 49             var hm = Math.floor(times % 100).toString();
 50             if(hm.length <= 1) {
 51                 hm = "0" + hm;
 52             }
 53             if(times == 0) {
 54                 $(".advbox").fadeOut(500);
 55                 clearInterval(countTime);
 56             }
 57             // 获取分钟、毫秒数
 58             $(".a").html(ms);
 59             $(".b").html(hm);
 60         }, 10);
 61     });
 62 </script>
 63 
 64 <script type="text/javascript">
 65 $(document).ready(function(){
 66 
 67     $(".advbox").show();
 68     $(".advbox").animate({top:"50%"},800);
 69     
 70     $(".closebtn").click(function(){
 71         $(".advbox").fadeOut(500);
 72     })
 73 })
 74 </script>
 75 
 76 
 77 
 78 
 79 
 80 
 81 <!--对联广告 开始-->
 82 <script type="text/javascript">
 83 
 84     document.write('<div class="dlAD_l" id="dlAD_l"><div class="close_dlAD"><span onclick="close_dlAD();">关闭</span></div><a rel="nofollow" href="http://info.machine.hc360.com/zt/zzwl/index.shtml"><img src="http://img04.hc360.com/machine/201612/201612131627554216.gif" /></a></div>');
 85 
 86     document.write('<div class="dlAD_r" id="dlAD_r"><div class="close_dlAD"><span onclick="close_dlAD();">关闭</span></div><a rel="nofollow" href="http://info.machine.hc360.com/zt/zzwl/index.shtml"><img src="http://img04.hc360.com/machine/201612/201612131627554216.gif" /></a></div>');
 87     
 88 </script>
 89 <script>
 90 function close_dlAD(){
 91     document.getElementById("dlAD_l").style.display="none";
 92     document.getElementById("dlAD_r").style.display="none";
 93     }
 94 </script>
 95 
 96 <style>
 97 .dlAD_l{width:110px;height:321px;float:left;position:fixed;top:121px;left:0;overflow:hidden;}
 98 .dlAD_r {width:110px;height:321px;float:right;position:fixed;top:121px;overflow:hidden;right:0;}.close_dlAD {width:108px;height:20px;line-height:22px;color:#333;font-size:12px;background:url(http://style.org.hc360.com/css_hy/images/new_dlAD/dlAD_close.jpg) no-repeat;overflow:hidden;}.close_dlAD span {cursor:pointer;}.dlAD_r .close_dlAD {background-position:3px 5px;}.dlAD_l .close_dlAD {background-position:94px 5px;}.dlAD_r .close_dlAD span {float:left;padding-left:19px;}.dlAD_l .close_dlAD span {float:right;padding-right:19px;}* html .dlAD_l {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop)+100);}* html .dlAD_r {position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop)+100);}* html, * html body {background-image:url(about:blank);background-attachment:fixed;}
 99 </style>
100 <!--对联广告 结束-->

 

posted @ 2019-11-25 15:21  南瓜小园  阅读(132)  评论(0编辑  收藏  举报