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 set the height of the autosize textarea in Element UI

After setting textarea input in Element UI to aut...

Optimization methods when Mysql occupies too high CPU (must read)

When Mysql occupies too much CPU, where should we...

XHTML: Frame structure tag

Frame structure tag <frameset></frameset...

How to use HTML 5 drag and drop API in Vue

The Drag and Drop API adds draggable elements to ...

Example of Vue implementing fixed bottom component

Table of contents 【Effect】 【Implementation method...

MySQL database constraints and data table design principles

Table of contents 1. Database constraints 1.1 Int...

JavaScript uses canvas to draw coordinates and lines

This article shares the specific code of using ca...

Table paging function implemented by Vue2.0+ElementUI+PageHelper

Preface I have been working on some front-end pro...

HTML form submission method case study

To summarize the form submission method: 1. Use t...

Weird and interesting Docker commands you may not know

Intro Introduces and collects some simple and pra...

A brief analysis of controlled and uncontrolled components in React

Table of contents Uncontrolled components Control...