我有两个div元素。我想了解如何完成以下操作:
我有HTML和CSS代码:
并且
这段CSS代码可以让内部块居中显示,但是它会在顶部位置显示。如何将内部块放置在外部主块的底部,就像图片上一样呢?谢谢!
![enter image description here](https://istack.dev59.com/dhdmB.webp)
<div class="main">
<div class="iner"></div>
</div>
并且
.main{
width: 1000px;
height: 500px;
background-color: #111210;
}
.iner{
width: 250px;
height: 250px;
background-color: #34cb2f;
margin: 0 auto;
bottom: 0;
}
这段CSS代码可以让内部块居中显示,但是它会在顶部位置显示。如何将内部块放置在外部主块的底部,就像图片上一样呢?谢谢!