-webkit-linear-gradient 线性渐变学习

来源:互联网 发布:哈尔滨雾霾数据 编辑:程序博客网 时间:2024/05/04 16:14

 -webkit-linear-gradient  第一个参数是渐变的方向  可以left,right,top,bottom,后面参数是个数组,是渐变的节点和颜色


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title></title>


    <style>

        .container {

            background: -webkit-linear-gradient(left, black, blue 50%, yellow 75%, black 100%) right top no-repeat;

            height: 100px;

        }

    </style>

</head>

<body style="background: gray;">

<div class="container">


</div>

</body>

</html>

0 0
原创粉丝点击