老师帮忙看下
来源:3-17 编程练习
vivi_li
2020-04-23 16:00:13
这个代码 我按照视频写的60% 40%,farthest-side circle 这样写不生效 最后改成了文档写的方式才生效,是现在有变化了么
<!DOCTYPE html>
<html lang="en">
<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: radial-gradient( farthest-side circle at 60% 40%,red 25%,yellow 50%,green 75%,blue 100%);
}
.div2{
background: radial-gradient( farthest-side circle at 60% 40%, red 25%,yellow 50%,green 75%,blue 100%);
}
.div3{
background: radial-gradient( farthest-side circle at 60% 40%, red 25%,yellow 50%,green 75%,blue 100%);
}
.div4{
background: radial-gradient( farthest-side circle at 60% 40%, red 25%,yellow 50%,green 75%,blue 100%);
}
</style>
</head>
<body>
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>
</body>
</html>
1回答
好帮手慕夭夭
2020-04-23
同学你好,代码实现正确。另外,是说的如下形式吗?
这样是可以的。可以再试一试,如果有问题,把代码全部粘贴上来,以便老师为你查找问题。
祝学习愉快 ~
相似问题