老师您好,麻烦看看有什么问题
来源:2-24 编程练习
宫蝉
2023-02-22 20:00:14
<!
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>线性渐变</title>
<style type="text/css">
/*此处写代码*/
.box{
width:100px;
height:100px;
border:1px solid #777;
float:left;
margin-left: 10px;
}
.box1{
background-image: linear-gradient(180deg,yellow,red);
}
.box2{
background-image: linear-gradient(90deg,yellow,red);
}
.box3{
background-image: linear-gradient(-45deg,yellow,red);
}
</style>
</head>
<body>
<!--此处写代码-->
<div class="box1 box"></div>
<div class="box2 box"></div>
<div class="box3 box"></div>
</html>
1回答
imooc_慕慕
2023-02-23
同学你好,代码可以实现效果,很棒,祝学习愉快~
相似问题