|
我 的 日 历 |
|
最 新 评 论 |
|
友 情 链 接 |
|
搜 索 日 志 |
|
访 问 计 数 |
|
获 取 R S S |
|
|
不断变化的网页背景-滤镜效果切换 [2006-2-21] jybbh 发表在 WEB相关
| <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>不断变化的网页背景</title>
<Script>
var backgroundimage=new Array("1.jpg","2.jpg","4.jpg");
var swapspeed=2;
var timer;
var imgpreload=new Array();
if (document.all) {
for (i=0;i<=backgroundimage.length-1;i++) {
imgpreload=new Image();
imgpreload.src=backgroundimage;
}
}
var i_backgroundimage=0;
swapspeed=swapspeed*1000;
function setTransition(){
document.getElementById("id_body").filters.revealTrans.transition=Math.floor(Math.random()*23);
document.getElementById("id_body").filters.revealTrans.apply();
//bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
//bannerADrotator.filters.revealTrans.apply();
}
function playTransition(){
document.getElementById("id_body").filters.revealTrans.play();
//bannerADrotator.filters.revealTrans.play()
}
function swapimages() {
if (document.all) {
window.status=i_backgroundimage;
setTransition();
document.body.background=backgroundimage[i_backgroundimage];
playTransition();
i_backgroundimage++;
if (i_backgroundimage>=backgroundimage.length) {i_backgroundimage=0}
timer=setTimeout("swapimages()",swapspeed) ;
}
}
window.onload=swapimages;
</Script>
<body id="id_body" style="FILTER: revealTrans(duration=2,transition=20)">
<marquee>abcabcabcabcabcabc</marquee>
</body>
</html> | | |
|