This article mainly introduces the four code settings for CSS to realize web page background gradient. It has certain reference value. Now I share it with everyone. Friends in need can refer to it
1. Gradient from top to bottom
body{ FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#ffffff,endColorStr=#000000); }
2. Gradient from top left to bottom right
body{ FILTER: Alpha( style=1,opacity=25,finishOpacity=100, startX=50,finishX= 100,startY=50,finishY=100); background-color: skyblue; }
3. Gradient from left to right
body{ FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#ffffff,endColorStr=#000000); }
4. Gradient from top to bottom
style="filter:progid:DXImageTransform.microsoft.gradient(gradienttype=0,startColorStr=blue,endColorStr=white);"
For example:
背景渐变
The above is the entire content of this article. I hope it will be helpful to everyone’s learning. Help, please pay attention to the PHP Chinese website for more related content!
Related recommendations:
Usage of CSS transparent opacity and IE versions of transparency filter filter
Comparison by priority Three ways to verify CSS control styles
About the use of window units and percentage units in CSS
The above is the detailed content of Four code settings for realizing web page background gradient using CSS. For more information, please follow other related articles on the PHP Chinese website!