3-17 老师帮我检查一下
来源:3-17 编程练习
慕少5306396
2019-03-27 19:49:58
<!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:radial-gradient(circle closest-side at 60% 40%,red,yellow,green,blue);
}
.div2{
background:radial-gradient(circle farthest-side at 60% 40%,red,yellow,green,blue);
}
.div3{
background:radial-gradient(circle closest-corner at 60% 40%,red,yellow,green,blue);
}
.div4{
background:radial-gradient(circle farthest-corner at 60% 40%,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回答
你好同学 , 效果完成的很不错 . 建议代码给背景设置各浏览器前缀 ,这样兼容性更好一些 , 参考本节课程:
祝学习愉快 ,望采纳 .
相似问题