假设我有 2 个 DIV,一个在彼此之上。
如何将顶部的文本对齐到 TOP ,并将底部的文本对齐到底部?
最佳答案
True -- vertical-align 仅在将每个 div 的 display
设置为 table-cell
时才有效
div#top, div#bottom { display: table-cell }
div#top { vertical-align: top }
div#bottom { vertical-align: bottom }
关于css - 垂直对齐 DIV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2294064/