3-17 老师检查
来源:3-17 编程练习
慕言_7946275
2019-07-23 16:10:21
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>径向渐变</title>
<style type="text/css">
div{
width:190px;height:280px;
float:left;
margin:20px 0 0 20px;
}
/*补充代码,分别写出4个元素的背景渐变效果*/
.div1{
background:-webkit-radial-gradient(60% 40%,circle closest-side,red,yellow,green,blue);
background: -moz-radial-gradient(60% 40%,circle closest-side,red,yellow,green,blue);
background: -o-radial-gradient(60% 40%,circle closest-side,red,yellow,green,blue);
background: radial-gradient(60% 40%,circle closest-side,red,yellow,green,blue);
}
.div2{
background:-webkit-radial-gradient(60% 40%,circle farthest-side,red,yellow,green,blue);
background: -moz-radial-gradient(60% 40%,circle farthest-side,red,yellow,green,blue);
background: -o-radial-gradient(60% 40%,circle farthest-side,red,yellow,green,blue);
background: radial-gradient(60% 40%,circle farthest-side,red,yellow,green,blue);
}
.div3{
background:-webkit-radial-gradient(60% 40%,circle closest-corner,red,yellow,green,blue);
background: -moz-radial-gradient(60% 40%,circle closest-corner,red,yellow,green,blue);
background: -o-radial-gradient(60% 40%,circle closest-corner,red,yellow,green,blue);
background: radial-gradient(60% 40%,circle closest-corner,red,yellow,green,blue);
}
.div4{
background:-webkit-radial-gradient(60% 40%,circle farthest-corner,red,yellow,green,blue);
background: -moz-radial-gradient(60% 40%,circle farthest-corner,red,yellow,green,blue);
background: -o-radial-gradient(60% 40%,circle farthest-corner,red,yellow,green,blue);
background: radial-gradient(60% 40%,circle farthest-corner,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回答
好帮手慕夭夭
2019-07-23
你好同学,效果实现正确,很棒哦。祝学习愉快!
相似问题