请老师看一下是否正确

请老师看一下是否正确

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>径向渐变</title>

    <style type="text/css">

        div{

            width:200px;height:300px;

            float:left;

            margin:100px 0 0 100px;                                  

        }

        /*补充代码,分别写出4个元素的背景渐变效果*/

        .div1{background:-webkit-radial-gradient(60% 40%,closest-side circle,red,yellow,green,blue);

             background:-moz-radial-gradient(60% 40%,closest-side circle,red,yellow,green,blue);

             background:  -o-radial-gradient(60% 40%,closest-side circle,red,yellow,green,blue); 

             background:     radial-gradient(60% 40%,closest-side circle,red,yellow,green,blue);

        }

        .div2{background:-webkit-radial-gradient(60% 40%,farthest-side circle,red,yellow,green,blue);

              background:   -moz-radial-gradient(60% 40%,farthest-side circle,red,yellow,green,blue);

              background:     -o-radial-gradient(60% 40%,farthest-side circle,red,yellow,green,blue);

              background:        radial-gradient(60% 40%,farthest-side circle,red,yellow,green,blue);}

        .div3{background:-webkit-radial-gradient(60% 40%,closest-corner circle,red,yellow,green,blue);

              background:   -moz-radial-gradient(60% 40%,closest-corner circle,red,yellow,green,blue);

              background:     -o-radial-gradient(60% 40%,closest-corner circle,red,yellow,green,blue);

              background:        radial-gradient(60% 40%,closest-corner circle,red,yellow,green,blue);}

        .div4{background:-webkit-radial-gradient(60% 40%,farthest-corner circle,red,yellow,green,blue);

              background:   -moz-radial-gradient(60% 40%,farthest-corner circle,red,yellow,green,blue);

              background:     -o-radial-gradient(60% 40%,farthest-corner circle,red,yellow,green,blue);

              background:        radial-gradient(60% 40%,farthest-corner circle,red,yellow,green,blue);}

    </style>      

</head>

<body>

    <div class="div1"></div>  

    <div class="div2"></div>       

    <div class="div3"></div>  

    <div class="div4"></div>  

</body>

</html>


正在回答

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

1回答

同学你好, 代码正确,效果实现的不错,继续加油哦

欢迎采纳,祝学习愉快~~~~

  • 慕大斯 提问者 #1
    请问老师,浏览器前缀是必须要写的么?
    2019-08-06 14:52:06
  • 好帮手慕慕子 回复 提问者 慕大斯 #2
    你好, 不是必须的。 但是目前浏览器对这个属性的兼容性不好, 所以推荐同学写上浏览器前缀哦, 祝学习愉快~~~~
    2019-08-06 15:33:58
问题已解决,确定采纳
还有疑问,暂不采纳

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

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

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

在线咨询

领取优惠

免费试听

领取大纲

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