3-2 请老师检查
来源:3-2 编程练习
慕妹6205103
2020-06-03 15:22:37
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>线性渐变</title>
<style type="text/css">
.one,.two,.three{
width: 200px;
height: 250px;
margin: 0 auto;
text-align: center;
float: left;
margin-right: 40px;
}
.one > div{
width: 200px;
height: 200px;
background: linear-gradient(yellow,red);
}
.two > div{
width: 200px;
height: 200px;
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);
}
.three > div{
width: 200px;
height: 200px;
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 class="one">
<p>上下方向渐变</p>
<div></div>
</div>
<div class="two">
<p>左右方向渐变</p>
<div></div>
</div>
<div class="three">
<p>对角方向渐变</p>
<div></div>
</div>
</html>
1回答
好帮手慕糖
2020-06-03
同学你好,代码是正确的。继续加油,祝学习愉快!
相似问题