cellpadding(HTML属性)

描述 (Description)

Use the cellpadding attribute to create some space around the contents of table cells (in th and td elements). The effect of this attribute’s application won’t be immediately obvious unless you’ve also set a border attribute for the table, as Figure 1 reveals.

使用cellpadding属性在表单元格的内容(在thtd元素中)周围创建一些空间。 除非您还为表设置了border属性,否则该属性的应用程序的效果不会立即显现,如图1所示。

The cellpadding attribute is similar to the cellspacing attribute, which is used to create space between and outside of the table cells.

cellpadding属性类似于cellspacing属性,该属性用于在表单元格之间和外部创建空间。

Two tables, with cellpadding values of five and ten pixels, respectively

Two tables, with cellpadding values of five and ten pixels, respectively

两张表格,其单元填充值分别为5和10像素

(Example)

The cellpadding for this table is set to "5" pixels:

table的单元格cellpadding设置为"5"像素:

<table border="1" cellpadding="5">
  <tr>
    <th>Account Type</th>
    <th>Interest Rate</th>
  </tr>
  <tr>
    <td>Smart</td>
    <td>From 2%</td>
  </tr>
  <tr>
    <td>Young Saver</td>
    <td>From 1.6%</td>
  </tr>
</table>

(Value)

This attribute takes a numerical value, which reflects a pixel measurement.

该属性采用一个数值,该数值反映了像素测量值。

翻译自: https://www.sitepoint.com/cellpadding-html-attribute/

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值