<style>#box{ z-index:99999; top:0; right:0; left:0; &nbs...
<style>
#box{
z-index:99999;
top:0;
right:0;
left:0;
bottom:0;
position:absolute;
width:100%;
height:100%;
text-align: center;
}
#box span{
width: 18px;
height: 18px;
border-radius: 50%;
background: gray;
color: #fff;
position: absolute;
top: 5px;
right: 5px;
text-align: center;
}
</style>
<script type="text/javascript">
//var = setTimeout(函数,毫秒);
//利用setTimeout() 里面嵌套 setInterval() 设置倒计时秒数(推荐)
//也可以利用setTimeout() 里面嵌套 setTimeout()
window.onload = function(){
var oDiv = document.getElementById('box');
var span = document.getElementById('span');
var num = span.innerHTML;
var timer = null;
setTimeout( function(){
oDiv.style.display = 'block';
timer = setInterval(function(){
num--;
span.innerHTML = num;
if(num == 0){
oDiv.style.display = 'none';
clearInterval(timer);
}
},1000);
},1500 );
};
</script>
<div id="box">
<img src="图片地址" id="gg"/>
<span id="span">3</span>
</div>