html代码
此为左上往右下渐变的代码:
<body style="FILTER:Alpha(style=1,opacity=25, finishOpacity=100, startX=50,finishX=100, StartY=50,finishY=100); background-color:#000000"> </body>
提示:可以先修改部分代码后再运行
从上往下渐变:
<body style="FILTER: progid:DXImageTransform.Microsoft.Gradient
(gradientType=0,startColorStr=#ffffff,endColorStr=#000000)">
<center>
<font size="+3"><strong>网页背景色渐变<br>
(从白色到黑色) </strong></font> <br>
<br>
</center>
</body>
一、从上往下渐变
body{
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#000000);
}
二、从左上至右下渐变
body{
FILTER: Alpha( style=1,opacity=25,finishOpacity=100,
startX=50,finishX= 100,startY=50,finishY=100);
background-color: skyblue;
}
三、从左往右渐变
body{
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#ffffff,endColorStr=#000000);
}
四、从上往下渐变
style="filter:progid:DXImageTransform.microsoft.gradient(gradienttype=0,startColorStr=blue,endColorStr=white);