老师我用的谷歌,是不加webkit没有反应,是不兼容性不好的原因吗

来源:3-17 编程练习

慕先生1376233

2020-05-26 21:40:20

<!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;

            }

       .div1{

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


        

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


       }

       .div2{

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


        

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


       }

       .div3{

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


        

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


       }

       .div4{

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


        

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


       }

       


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

    </style>      

</head>

<body>

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

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

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

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

</body>

</html>


写回答

1回答

好帮手慕言

2020-05-27

同学你好,是存在兼容性问题的,加上特定的浏览器兼容性处理才可以生效。祝学习愉快~

0

0 学习 · 40143 问题

查看课程