拉幅广告代码
<!doctype html>
<html>
<head>
<meta charset="gb2312">
<title>拉幅廣告</title>
</head><body><script src="http://www.hc360.com/dx/zl/2016/1121/js/jquery-1.10.2.min.js"></script><!--拉幕廣告-->
<style type="text/css">
/* advbox */
*html,*html body{background-image:url(about:blank);background-attachment:fixed;}
*html .advbox{position:absolute;top:expression(eval(document.documentElement.scrollTop));}
.advbox{width:1190px;position:fixed;display:none;left:50%;top:0;margin:-200px 0 0 -595px;}
.advbox .advpic{position:relative;height:450px;overflow:hidden;}
.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;}
.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;}
.advbox .advpic .ad_time strong{width: 20px;display: inline-block;text-align: center;font-family: georgia;color: #fff;}
</style>
<div class="advbox"><div class="advpic"><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><div href="javascript:void(0);" class="closebtn">關閉</div><div class="ad_time"> 廣告時間還剩<strong class="a">10</strong>秒 <strong class="b"></strong>毫秒</div></div>
</div>
<script type="text/javascript">$(document).ready(function() {var times = 5 * 100; // 60秒
countTime = setInterval(function() {times = --times < 0 ? 0 : times;var ms = Math.floor(times / 100).toString();if(ms.length <= 1) {ms = "0" + ms;}var hm = Math.floor(times % 100).toString();if(hm.length <= 1) {hm = "0" + hm;}if(times == 0) {$(".advbox").fadeOut(500);clearInterval(countTime);}// 獲取分鐘、毫秒數
$(".a").html(ms);$(".b").html(hm);}, 10);});
</script><script type="text/javascript">
$(document).ready(function(){$(".advbox").show();$(".advbox").animate({top:"50%"},800);$(".closebtn").click(function(){$(".advbox").fadeOut(500);})
})
</script></body>
</html>
?
轉載于:https://www.cnblogs.com/su1637/p/8259241.html
總結
- 上一篇: 分布式计算引擎MapReduce
- 下一篇: Redis 入门笔记