老师,请问这样对吗?
来源:5-2 编程练习
weixin_慕沐1043483
2019-07-04 22:05:18
<html>
<head>
<style type="text/css">
.div0{
background-color:#ffffff;
width:300px;
height:400px;
}
.div1{
width:200px;
height:200px;
position:absolute;
top:20px;
left:30px;
z-index:200;
}
.div2{
width:200px;
height:200px;
position:absolute;
top:30px;
left:40px;
z-index:300;
}
</style>
</head>
<body>
<div class="div0">
<div class="div1">
<img src="img/2.jpg" />
</div>
<div class="div2">
<img src="img/1.jpg" />
</div>
</div>
</body>
</html>
1回答
同学你好,逻辑清晰,继续加油!祝学习愉快!
相似问题