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 make your own native JavaScript router

Table of contents Preface Introduction JavaScript...

JS realizes the automatic playback effect of pictures

This article shares the specific code of JS to ac...

Detailed explanation of deploying MySQL using Docker (data persistence)

This article briefly describes how to use Docker ...

How to write beautiful HTML code

What Beautiful HTML Code Looks Like How to write ...

How to implement Svelte's Defer Transition in Vue

I recently watched Rich Harris's <Rethinki...

MySQL installation and configuration methods and precautions under Windows platform

2.1、msi installation package 2.1.1、Installation I...

A simple way to achieve scrolling effect with HTML tag marquee (must read)

The automatic scrolling effect of the page can be...

How to use HTML+CSS to create TG-vision homepage

This time we use HTML+CSS layout to make a prelim...

React passes parameters in several ways

Table of contents Passing parameters between pare...

JavaScript canvas to load pictures

This article shares the specific code of JavaScri...

Sample code for generating QR code using js

Some time ago, the project needed to develop the ...

Ten Experiences in Presenting Chinese Web Content

<br /> Focusing on the three aspects of text...

JS implements city list effect based on VUE component

This article example shares the specific code for...