老师,请帮帮忙检查,谢谢
来源:3-7 编程练习
慕神8387157
2019-05-27 17:32:46
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>线性渐变</title>
<style type="text/css">
div{
width:400px;height:400px;border:1px solid red;
/*补充代码,给div元素设置背景渐变*/
background: -webkit-linear-gradient(90deg,rgba(255,0,0,0) 20%,rgba(255,0,0,1) 50%,rgba(0,255,0,.7) 90%);
background: -moz-linear-gradient(90deg,rgba(255,0,0,0) 20%,rgba(255,0,0,1) 50%,rgba(0,255,0,.7) 90%);
background: -o-linear-gradient(90deg,rgba(255,0,0,0) 20%,rgba(255,0,0,1) 50%,rgba(0,255,0,.7) 90%);
background: linear-gradient(90deg,rgba(255,0,0,0) 20%,rgba(255,0,0,1) 50%,rgba(0,255,0,.7) 90%);
}
</style>
</head>
<body>
<div></div>
</body>
</html>
1回答
好帮手慕夭夭
2019-05-27
你好同学,效果实现的正确,很棒,祝学习愉快!
相似问题