1、背景颜色设置渐变色
background: linear-gradient(red,yellow);
从上到下由红变黄,默认从上向下变化
2、background: linear-gradient(to top, red,yellow);
从下往上由红变黄,to top往上
3、background: linear-gradient(to right, red,yellow);
从左向右变化
4、background: linear-gradient(to top right, red,yellow,blue);
向右上方变化
更多:https://blog.csdn.net/u012485291/article/details/46492237
<!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>Document</title>
<style>
div{
width: 200px;
height: 200px;
background: -webkit-gradient(linear, 0% 0%, 0% 35%, from(rgb(115,202,250)), to(#fafafa));
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>
阴影:
https://www.cnblogs.com/mfbzr/p/14154156.html