Html 使用CSS设置表格样式
我有一张简单的桌子:Html 使用CSS设置表格样式,html,css,html-table,Html,Css,Html Table,我有一张简单的桌子: <table class="caspGrid"> <thead></thead> <tbody> <tr class="caspRow"> <td class="caspColEntity"> <input type="checkbox"/> <span>Fav
<table class="caspGrid">
<thead></thead>
<tbody>
<tr class="caspRow">
<td class="caspColEntity">
<input type="checkbox"/>
<span>Favorites</span>
<p>(<span>2</span>)</p>
</td>
<td class="caspColSummary">
<p>FY13 SPM Mobility Strategy</p>
<p>FY13 SPM Mobility Strategy</p>
<p>FY13 SPM Mobility Strategy</p>
</td>
<td class="caspColTeam">
<p>Tim Smith</p>
<p>Tim Smith</p>
<p>Tim Smith</p>
</td>
</tr>
</tbody>
</table>
最爱
(二)
2013财年SPM流动战略
2013财年SPM流动战略
2013财年SPM流动战略
蒂姆·史密斯
蒂姆·史密斯
蒂姆·史密斯
我希望表格能跨越整个页面高度,但我希望每个
都能围绕内容,最后一个
能跨越剩下的部分,我该怎么做
您可以使用:
这将只针对最后一个tr
演示:
如果一页中有多个表,则应使用子代
或子代
选择器:
/* Descendant */
table tr:last-of-type {
height: 100%;
}
/* Child */
table > tr:last-of-type {
height: 100%;
}
谢谢,优雅而简单。
/* Descendant */
table tr:last-of-type {
height: 100%;
}
/* Child */
table > tr:last-of-type {
height: 100%;
}