右下角随机显示的CSS+JS图片广告
代码简介:
在右下角随机显示的图片广告,随机的形式是载入图片的顺序没有规律,完全由程序随机调用的图片,至于显示在什么地方,这个是灵活的,你也可以改为显示在最上角。
代码内容:
View Code
<html>
<head>
<title>右下角随机显示的CSS+JS图片广告_网页代码站(www.webdm.cn)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<div id="div1" style="position: absolute; text-align:center; visibility:hidden; filter: revealTrans(Transition=8, Duration=1) revealTrans(Transition=9, Duration=3)
revealTrans(Transition=10, Duration=1) revealTrans(Transition=11, Duration=2) revealTrans(Transition=12, Duration=3) revealTrans(Transition=17, Duration=2)
revealTrans(Transition=18, Duration=3) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=3)"><img
id="img1"></div>
<script language="javascript">
var n=0;
var n1=0;
var is=true;
document.all.div1.style.top=document.body.clientHeight-135;
document.all.div1.style.left=document.body.clientWidth-175;
function showdiv(){
n=Math.floor(Math.random()*10);
document.all.div1.filters[n].apply();
if (n1==4){n1=1}
else{n1=n1+1}
document.all.img1.src="http://www.webdm.cn/images/wall"+n1+".jpg";
if (is==true){
document.all.div1.style.visibility="visible";
is=false;
}else{
document.all.div1.style.visibility="hidden";
is=true;
}
document.all.div1.filters[n].play();
setTimeout("showdiv()",6000);
}
showdiv();
function place(){
window.status=String(n);
document.all.div1.style.top=parseInt(document.body.scrollTop)+parseInt(document.body.clientHeight)-135;
document.all.div1.style.left=parseInt(document.body.scrollLeft)+parseInt(document.body.clientWidth)-175;
setTimeout("place()",50)
}
place();
</script>
</body>
</html>
<br />
<p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的网页代码下载网站 - 致力为中国站长提供有质量的网页代码!</p>
代码来自:http://www.webdm.cn/webcode/7cb4494d-f8b0-4463-9be3-66de3dc09912.html
<head>
<title>右下角随机显示的CSS+JS图片广告_网页代码站(www.webdm.cn)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<div id="div1" style="position: absolute; text-align:center; visibility:hidden; filter: revealTrans(Transition=8, Duration=1) revealTrans(Transition=9, Duration=3)
revealTrans(Transition=10, Duration=1) revealTrans(Transition=11, Duration=2) revealTrans(Transition=12, Duration=3) revealTrans(Transition=17, Duration=2)
revealTrans(Transition=18, Duration=3) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=3)"><img
id="img1"></div>
<script language="javascript">
var n=0;
var n1=0;
var is=true;
document.all.div1.style.top=document.body.clientHeight-135;
document.all.div1.style.left=document.body.clientWidth-175;
function showdiv(){
n=Math.floor(Math.random()*10);
document.all.div1.filters[n].apply();
if (n1==4){n1=1}
else{n1=n1+1}
document.all.img1.src="http://www.webdm.cn/images/wall"+n1+".jpg";
if (is==true){
document.all.div1.style.visibility="visible";
is=false;
}else{
document.all.div1.style.visibility="hidden";
is=true;
}
document.all.div1.filters[n].play();
setTimeout("showdiv()",6000);
}
showdiv();
function place(){
window.status=String(n);
document.all.div1.style.top=parseInt(document.body.scrollTop)+parseInt(document.body.clientHeight)-135;
document.all.div1.style.left=parseInt(document.body.scrollLeft)+parseInt(document.body.clientWidth)-175;
setTimeout("place()",50)
}
place();
</script>
</body>
</html>
<br />
<p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的网页代码下载网站 - 致力为中国站长提供有质量的网页代码!</p>
代码来自:http://www.webdm.cn/webcode/7cb4494d-f8b0-4463-9be3-66de3dc09912.html