我试图修改这段代码,使得鼠标悬停在哪个方块上,该方块就能置于最前面。
如果有建议或帮助将不胜感激!
.bouncyHouse {
height:200px;
width:150%;
background-color: black;
position: relative;
}
.bouncer {
position: absolute;
width: 200px;
color:white;
font-size:50px;
background-color:yellow;
}
.bouncer:nth-child(2){
top: 30px;
left: 100px;
background-color:green;
}
.bouncer:nth-child(3){
top: 50px;
left: 200px;
background-color:red;
}