Method 1:
Graph implementation
1. Cut a 1*760 gradient background image.
2. Add background information in dw
Method 2:
The code is as follows:
<Html>
<Body style = "FILTER: progid: DXImageTransform. Microsoft. Gradient (gradientType = 0, startColorStr = # ffffff, endColorStr = #000000)">
<Center>
<Font size = "+ 3"> <strong> webpage background color gradient <br>
(From white to black) </strong> </font> <br>
<Br>
</Center>
</Body>
</Html>
Below is a diagonal gradient.
<Html>
<Body style = "FILTER: Alpha (style = 1, opacity = 25, finishOpacity = 100, startX = 50, finishX = 100, startY = 50, finishY = 100 ); background-color: skyblue ">
<H1> background gradient (upper left to lower right) </Body>
</Html>
COOL!
Method 3:
Implemented using javascript
<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 ://";
}
}
// Unhide -->
</SCRIPT>
<Body bgcolor = "# fef4d9" onLoad = "fadeIn (16)">
<