背景,文字渐变(无闪屏)
背景变换
2/3||c==0)&&c0)
{
c--
d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}
function disco()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag--
}
if (document.all)
setTimeout('disco()',20)
}
disco()
//-->
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
文字颜色渐变(无闪屏)
2/3||c==0)&&c0)
{
c--
d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}
function disco()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.fgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.fgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag--
}
if (document.all)
setTimeout('disco()',0)
}
disco()
//-->
文字颜色渐变(无闪屏)
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
function wh_10to16(n){
var a = new Array(16);
a[0]="0";a[1]="1";a[2]="2";a[3]="3";a[4]="4";a[5]="5";a[6]="6";a[7]="7";a[8]="8";a[9]="9";a[10]="A";a[11]="B";a[12]="C";a[13]="D";a[14]="E";a[15]="F";
return a[parseInt(n/16)]+a[n%16]
}
function wh_TransbgMakeColor(r,g,b){
return wh_10to16(r)+wh_10to16(g)+wh_10to16(b);
}
function wh_TransbgGetColorInc(r1,r2){
if (r1 r2) return -1; else return 0;
}
function wh_changebg() {
var r = wh_TransbgR1;
var g = wh_TransbgG1;
var b = wh_TransbgB1;
wh_TransbgR1 += wh_TransbgGetColorInc(wh_TransbgR1,wh_TransbgR2)*wh_TransbgSpeed;
wh_TransbgG1 += wh_TransbgGetColorInc(wh_TransbgG1,wh_TransbgG2)*wh_TransbgSpeed;
wh_TransbgB1 += wh_TransbgGetColorInc(wh_TransbgB1,wh_TransbgB2)*wh_TransbgSpeed;
if ((r-wh_TransbgR2)*(wh_TransbgR1-wh_TransbgR2) = wh_TransbgTotal-1) {
if (!wh_TransbgLoop && wh_TransbgCount==1) return;
wh_TransbgCount++;
wh_TransbgIndex=0;
}
wh_TransbgR1 =wh_TransbgColorsR[wh_TransbgIndex];
wh_TransbgG1 =wh_TransbgColorsG[wh_TransbgIndex];
wh_TransbgB1 =wh_TransbgColorsB[wh_TransbgIndex];
wh_TransbgR2 =wh_TransbgColorsR[wh_TransbgIndex+1];
wh_TransbgG2 =wh_TransbgColorsG[wh_TransbgIndex+1];
wh_TransbgB2 =wh_TransbgColorsB[wh_TransbgIndex+1];
}
setTimeout("wh_changebg()", 1);
}
wh_TransbgR1=0;
wh_TransbgG1=0;
wh_TransbgB1=0;
wh_TransbgR2=0;
wh_TransbgG2=0;
wh_TransbgB2=0;
wh_TransbgSpeed=1;
wh_TransbgLoop=true;
wh_TransbgTotal=4;
wh_TransbgIndex =wh_TransbgTotal-1;
wh_TransbgColorsR = new Array(wh_TransbgTotal);
wh_TransbgColorsG = new Array(wh_TransbgTotal);
wh_TransbgColorsB = new Array(wh_TransbgTotal);
wh_TransbgColorsR[0]=255;
wh_TransbgColorsG[0]=240;
wh_TransbgColorsB[0]=230;
wh_TransbgColorsR[1]=230;
wh_TransbgColorsG[1]=255;
wh_TransbgColorsB[1]=240;
wh_TransbgColorsR[2]=240;
wh_TransbgColorsG[2]=230;
wh_TransbgColorsB[2]=255;
wh_TransbgColorsR[3]=255;
wh_TransbgColorsG[3]=240;
wh_TransbgColorsB[3]=230;
wh_TransbgCount=0;
wh_changebg();
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]