站 内 搜 索
推 荐 合 作 商
优 秀 内 容 推 荐
您当前位置:
中国素材首页
>>
网页特效
>>
背景类
>> 背景快速闪烁
背景快速闪烁
中国素材网 www.sucai.com 2005-8-8 14:19:00 流量数:
背景快速闪烁
[
查看演示
] 源码如下
----------------------------------------------------------------------------------------
脚本说明:
第一步:把如下代码加入<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from old browsers
var Color= new Array(9);
Color[1] = "ff";
Color[2] = "ee";
Color[3] = "dd";
Color[4] = "cc";
Color[5] = "bb";
Color[6] = "aa";
Color[7] = "99";
Color[8] = "88";
Color[9] = "77";
Color[10] = "66";
Color[11] = "55";
Color[12] = "44";
Color[13] = "33";
Color[14] = "22";
Color[15] = "11";
Color[16] = "00";
/* Do not display text on a fading background. Instead, let it
fade in and out once or twice, then load a new page. */
function fadeIn(where) {
if (where >= 1) {
document.bgColor="#" + Color[where] +"0000";
where -= 1;
setTimeout("fadeIn("+where+")", 15);
} else {
setTimeout('fadeOut(1)', 15);
}
}
function fadeOut(where) {
if (where <=16) {
document.bgColor="#" + Color[where] +"0000";
where += 1;
setTimeout("fadeOut("+where+")", 15)
} else {
setTimeout("fadeIn(16)", 15);
// window.location.href="http://www.netscape.com/";
}
}
// Unhide -->
</SCRIPT>
第二步:把<body>中的内容改为:
<body bgcolor="#fef4d9" onLoad="fadeIn(16)">