Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662
:::| 目前位置圖示目前位置:首頁圖示回首頁 | 主功能頁圖示相關問答
如何設定table內tbody下的td的style

[日期]:2026/07/10  [瀏覽人數]:55

如果報表table中有THEAD、TBODY,只想在TBODY下的TD才適用設定的style,該如何設定?

如想把TBODY下的TD的框線都設定為有框線,最爆力的方式就是在tbody下的每個td內都設定框線的style。

有更簡潔的作法,在style先新增tbody td{style設定},然後再套用在table中,

< style type='text/css'>

.boxtable tbody td {border:1px solid #000000}

< /style>

< html>

< table class='boxtable' cellspacing=4 cellpadding=2>

< thead>

< tr>< td>............< /td>< /tr>

< /thead>

< tbody>

< tr>< td>.....< /td>< /tr>

< /tbody>

< /table>