网页渐变背景

用图实现1切一张1*760的渐变背景图2在dw中添加做背景方法二:用css实现,代码如下:<html><ody style="FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#000000)"><center><font size="+3"><strong>网页背景色渐变<r>(从白色到黑色) </strong></font> <r><r></center></ody></html>下面这个是斜角渐变啊<html><ody style="FILTER: Alpha( style=1,opacity=25,finishOpacity=100,startX=50,finishX= 100,startY=50,finishY=100); ackground-color: skylue"><h1>背景渐变(左上至右下)</h1></ody></html>很COOL的哦!方法三:用javascript实现<SCRIPT LANGUAGE="javascript"><!-- Hide from old rowsersvar Color= new Array(9);Color[1] = "ff";Color[2] = "ee";Color[3] = "dd";Color[4] = "cc";Color[5] = "";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 ackground. Instead, let itfade in and out once or twice, then load a new page. */function fadeIn(where) {if (where >= 1) {document.gColor="#" + Color[where] +"0000"; where -= 1;setTimeout("fadeIn("+where+")", 15);} else {setTimeout('fadeOut(1)', 15);}}function fadeOut(where) {if (where <=16) {document.gColor="#" + Color[where] +"0000";where += 1;setTimeout("fadeOut("+where+")", 15)} else {setTimeout("fadeIn(16)", 15);// window.location.href="http://www.wejx.com";}}// Unhide --></SCRIPT><ody gcolor="#fef4d9" >

你可能感兴趣的:(JavaScript,function,css,filter)