请问对吗?
来源:3-2 编程练习
神知
2019-06-25 21:10:11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>线性渐变</title>
<style type="text/css">
/*此处写代码*/
div{
width:100px;
height:100px;
background:#fff;
float:left;
margin-right:10px;
}
.jianb_1{
background:linear-gradient(yellow,red);
}
.jianb_2{
background: -webkit-linear-gradient(left,yellow,red);
background: -moz-linear-gradient(right,yellow,red);
background: -o-linear-gradient(right,yellow,red);
background: linear-gradient(to right,yellow,red);
}
.jianb_3{
background: -webkit-linear-gradient(right bottom,yellow,red);
background: -moz-linear-gradient(left top,yellow,red);
background: -o-linear-gradient(left top,yellow,red);
background: linear-gradient(to left top,yellow,red);
}
</style>
</head>
<body>
<!--此处写代码-->
<div>
<p>上下方向渐变</p>
<div class="jianb_1">
</div>
</div>
<div>
<p>左右方向渐变</p>
<div class="jianb_2">
</div>
</div>
<div>
<p>对角方向渐变</p>
<div class="jianb_3">
</div>
</div>
</html>1回答
同学你好,实现效果没有问题,继续加油!
祝学习愉快!