麻烦老师看看
来源:3-2 编程练习
陈孝芳
2019-11-02 17:55:22
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>线性渐变</title>
<style type="text/css">
/*此处写代码*/
div{
width:100px;
height:100px;
float:left;
margin-right:20px;
display:line-block;
}
.one{
background:linear-gradient(yellow,red);
}
.two{
background:linear-gradient(to right,yellow,red);
}
.three{
background:linear-gradient(to right bottom,red,yellow);
}
</style>
</head>
<body>
<!--此处写代码-->
<div>上下方向渐变
<div class="one"></div>
</div>
<div>左右方向渐变
<div class="two"></div>
</div>
<div>对焦方向渐变
<div class="three"></div>
</div>
</html>
1回答
好帮手慕糖
2019-11-02
同学你好,实现没有问题,继续加油!欢迎采纳。
祝学习愉快!