HTML上下渐变背景
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>渐变背景</title>
</head>
<body>
<div class="background1">
</div>
<div class="background2">
</div>
<div class="background3">
</div>
</body>
</html>
<style>
.background1 {
width: 600px;
height: 200px;
background: linear-gradient(180deg, #ee5151, #b11d1d);
}
.background2 {
width: 600px;
height: 200px;
background: linear-gradient(180deg, #0064d9, #11428c);
}
.background3 {
width: 600px;
height: 200px;
background: linear-gradient(180deg, hsl(28.6699,100%,45%) 0%, hsl(28.6699,75%,35%) 100%);
}
</style>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/2b7f72e956e51e240bdc312a2274b72d.jpeg)