下面的例子把表格单元边界与单元内容之间的间距设置为 10 像素:
</>code
- <table border="8"
cellpadding="10"
>- <tr>
- <th>Month</th>
- <th>Savings</th>
- </tr>
- <tr>
- <td>January</td>
- <td>$100</td>
- </tr>
- </table>
cellpadding 属性规定单元边沿与其内容之间的空白。
注释:请勿将该属性与 cellspacing 属性相混淆,cellspacing 属性规定的是单元之间的空间。
从实用角度出发,最好不要规定 cellpadding,而是使用 CSS 来添加内边距。
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号