是否正确呢

是否正确呢

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>线性渐变</title>
    <style type="text/css">
    /*此处写代码*/
    div{
        width: 300px;height: 300px;
        display: inline-block;
        margin-top: 20px;
        text-align: center;
    }
    .diva,.divb,.divc{
        width: 200px;height: 200px;
        
    }
    .diva{
        background: linear-gradient(yellow,red);
    }
    .divb{
        background: linear-gradient(to right,yellow,red);
    }
    .divc{

        background:-webkit-linear-gradient(right bottom,red,yellow);

        background:   -moz-linear-gradient(right bottom,red,yellow);

        background:     -o-linear-gradient(right bottom,red,yellow);

        background:        linear-gradient(to right bottom,red,yellow);
    }
    </style>
</head>
<body>
    <!--此处写代码-->
    <div class="one">上下方向渐变
        <div class="diva"></div>
    </div>
    <div class="one">左右方向渐变
        <div class="divb"></div>
    </div>
    <div class="one">对角方向渐变
        <div class="divc"></div>
    </div>
</html>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕慕子 2020-01-16 11:37:53

同学你好,代码是正确的,继续加油, 祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师