【发布时间】:2014-07-21 01:42:25
【问题描述】:
请通过 CSS 帮助 div 或 li 元素的自动垂直高度。
当我对表格执行此操作时:
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="5" height="600">IMG width=100% height=auto</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
</table>
作为example,右列中的每个单元格都有左单元格高度的 1/5。我如何在没有表格且仅使用 div 或 li 元素的情况下做到这一点?
左侧单元格的高度未知;该元素是响应式的。
【问题讨论】:
-
喜欢this ?
标签: html css html-lists vertical-alignment