其他分享
首页 > 其他分享> > base-css-线性渐变

base-css-线性渐变

作者:互联网

<!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{
            height: 100px;
            border: 2px solid #ddd;
        }
        div:first-child{
            /*渐变色 红绿蓝 默认从上到下垂直分布*/
            /*90deg可以改变角度 方向变为从左到右 等效于 to right*/
            /* background: linear-gradient(90deg,red,green,blue); */

            /*左上到右下*/
            background: linear-gradient(to bottom right,red,green,blue);
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>

 

标签:blue,right,linear,gradient,渐变,90deg,base,background,css
来源: https://www.cnblogs.com/ABC-wangyuhan/p/15516816.html