From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/padding-bottom/index.html | 147 ++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 files/zh-cn/web/css/padding-bottom/index.html (limited to 'files/zh-cn/web/css/padding-bottom') diff --git a/files/zh-cn/web/css/padding-bottom/index.html b/files/zh-cn/web/css/padding-bottom/index.html new file mode 100644 index 0000000000..3046bcce32 --- /dev/null +++ b/files/zh-cn/web/css/padding-bottom/index.html @@ -0,0 +1,147 @@ +--- +title: padding-bottom +slug: Web/CSS/padding-bottom +tags: + - CSS + - CSS 内边距 + - CSS 属性 +translation_of: Web/CSS/padding-bottom +--- +
{{CSSRef}}
+ +

CSS属性 padding-bottom 是指一个元素在内边距区域(padding area)中下方的高度。内边距(padding)是指一个元素的内容和边框之间的区域。和外边距(margin)不同,内边距(padding)是不允许有负值的。内边距(padding)可以用四个值声明一个元素的四个方向的内边距(paddings),这是一种CSS缩写属性。

+ +

The effect of the CSS padding-bottom property on the element box

+ +
/* <length> values */
+padding-bottom: 0.5em;
+padding-bottom: 0;
+padding-bottom: 2cm;
+
+/* <percentage> value */
+padding-bottom: 10%;
+
+/* Global values */
+padding-bottom: inherit;
+padding-bottom: initial;
+padding-bottom: unset;
+
+ +

{{cssinfo}}

+ +

Syntax

+ +

Values

+ +
+
{{cssxref("length")}}
+
当内边距(padding)大小是一个固定单位数值的时候,一定不能为负数。
+
 
+
{{cssxref("percentage")}}
+
当内边距(padding)是一个百分比的时候, 百分比是和本身包含的元素的宽度有关的,同样一定不能为负数。
+
+ +

Formal syntax

+ +
{{csssyntax}}
+ +

Examples

+ +
.content { padding-bottom: 5%; }
+.sidebox { padding-bottom: 10px; }
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('CSS3 Box', '#the-padding', 'padding-bottom') }}{{ Spec2('CSS3 Box') }}No change from {{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }}.
{{ SpecName('CSS3 Transitions', '#animatable-css', 'padding-bottom') }}{{ Spec2('CSS3 Transitions') }}Defines padding-bottom as animatable.
{{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-bottom') }}{{ Spec2('CSS2.1') }}No change from {{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }}.
{{ Specname('CSS1', '#padding-bottom', 'padding-bottom') }}{{ Spec2('CSS1') }}Initial definition.
+ +

Browser compatibility

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support1.0{{CompatVersionUnknown}}1.0 (1.0)4.03.51.0 (85)
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf