HTML background color gradient achieved through CSS

HTML background color gradient achieved through CSS
Effect screenshots:

Implementation code:

Copy code
The code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<style type="text/css">
.linear{
width:100%;
height:600px;
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=##15A216,endColorStr=#fafafa); /*IE*/
background:-moz-linear-gradient(top,#15A216,#fafafa);/*Firefox*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#15A216), to(#fafafa));/*Google*/
background-image: -webkit-gradient(linear,left bottom,left top,color-start(0, #15A216),color-stop(1, #fafafa));/* Safari & Chrome*/
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#15A216', endColorstr='#fafafa'); /*IE6 & IE7*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#15A216', endColorstr='#fafafa')"; /* IE8 */
}
</style>
</head>
<body>
<div class="linear"></div>
</body>
</html>

<<:  SQL implementation of LeetCode (175. Joining two tables)

>>:  Sample code for changing the color of a png image through a CSS3 filter

Recommend

How to install docker using YUM

As shown in the following figure: If the version ...

Control the vertical center of the text in the HTML text box through CSS

When the height attribute of Text is defined, the ...

Simple tips to increase web page loading speed

The loading speed of a web page is an important in...

Use Python to connect to MySQL database using the pymysql module

Install pymysql pip install pymysql 2|0Using pymy...

Docker FAQ

Docker only maps ports to IPv6 but not to IPv4 St...

Node.js+express message board function implementation example

Table of contents Message Board Required librarie...

Detailed explanation of the solution to Ubuntu dual system stuck when starting

Solution to Ubuntu dual system stuck when startin...

Specific example of MySQL multi-table query

1. Use the SELECT clause to query multiple tables...