How can I position my div at the bottom of its container?(如何将我的 div 放在其容器的底部?)
问题描述
Given the following HTML:
I would like #copyright
to stick to the bottom of #container
. Can I achieve this without using absolute positioning?
The flexbox approach!
In supported browsers, you can use the following:
Example Here
The solution above is probably more flexible, however, here is an alternative solution:
Example Here
As a side note, you may want to add vendor prefixes for additional support.
这篇关于如何将我的 div 放在其容器的底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!