老师,请检查代码,谢谢
来源:2-7 编程练习
qq_慕姐242209
2020-01-06 23:57:22
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
}
.blue{
width: 100px;
height: 100px;
background: blue;
float:left;
position:relative;
top:50px;
left:50px;
z-index:9;
}
.red{
width: 100px;
height: 100px;
background: red;
position:relative;
top:100px;
left:0;
z-index:1;
}
</style>
</head>
<body>
<div class="blue"></div>
<div class="red"></div>
</body>
</html>
1回答
同学你好,代码是正确的,继续加油, 祝学习愉快~