Home > Web Front-end > CSS Tutorial > Four code settings for realizing web page background gradient using CSS

Four code settings for realizing web page background gradient using CSS

不言
Release: 2018-06-28 14:05:22
Original
3561 people have browsed it

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); 
}
Copy after login

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; 
}
Copy after login

3. Gradient from left to right

body{ 
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#ffffff,endColorStr=#000000); 
}
Copy after login

4. Gradient from top to bottom

style="filter:progid:DXImageTransform.microsoft.gradient(gradienttype=0,startColorStr=blue,endColorStr=white);"
Copy after login

For example:

 
 
 
 
背景渐变 

Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template