Get to know MDN better
元素的内边距区域是其内容和边框之间的空间。
备注:通过 padding 属性,只需一次声明,就可以为元素的所有四边设置内边距。
padding-right 属性可以从下面的列表中指定一个值。与 margin 不同,padding 不允许使用负值。
作为定值的内边距尺寸。必须是非负值。
<percentage>相对于包含块的行内尺寸(水平语言中的宽度,由 writing-mode 定义)的百分比。必须是非负值。
| 0 |
| all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column. It also applies to ::first-letter and ::first-line. |
| 否 |
| refer to the width of the containing block |
| the percentage as specified or the absolute length |
| a length |
| CSS Box Model Module Level 3 # padding-physical |
启用 JavaScript 以查看此浏览器兼容性表。