【发布时间】:2010-02-19 04:28:05
【问题描述】:
假设我有 2 个 DIV ,一个在彼此之上。
如何将 top 的文字对齐到 TOP ,将bottom 的文字对齐到 Bottom ?
【问题讨论】:
假设我有 2 个 DIV ,一个在彼此之上。
如何将 top 的文字对齐到 TOP ,将bottom 的文字对齐到 Bottom ?
【问题讨论】:
True -- 仅当您将每个 div 的 display 设置为 table-cell 时,垂直对齐才有效
div#top, div#bottom { display: table-cell }
div#top { vertical-align: top }
div#bottom { vertical-align: bottom }
【讨论】: