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/html/element/tfoot/index.html | 202 ++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 files/zh-cn/web/html/element/tfoot/index.html (limited to 'files/zh-cn/web/html/element/tfoot/index.html') diff --git a/files/zh-cn/web/html/element/tfoot/index.html b/files/zh-cn/web/html/element/tfoot/index.html new file mode 100644 index 0000000000..ecfae6ee88 --- /dev/null +++ b/files/zh-cn/web/html/element/tfoot/index.html @@ -0,0 +1,202 @@ +--- +title: +slug: Web/HTML/Element/tfoot +translation_of: Web/HTML/Element/tfoot +--- +

HTML 元素<tfoot>  定义了一组表格中各列的汇总行。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
内容类别无。
允许的内容 0或多个{{HTMLElement("tr")}} 元素。
标签省略开始标签是必需的。.在父元素 {{HTMLElement("table")}} 没有后续内容的情况下,结束标签可被省略。
允许的父元素{{HTMLElement("table")}} 元素。{{HTMLElement("tfoot")}} 必须出现在一个或多个 {{HTMLElement("caption")}},{{HTMLElement("colgroup")}},{{HTMLElement("thead")}}, {{HTMLElement("tbody")}},或 {{HTMLElement("tr")}} 元素之后。 注意这是自 HTML5 起有的要求。
+ {{HTMLVersionInline("4")}} {{HTMLElement("tfoot")}} 元素不能放在任何 {{HTMLElement("tbody")}} 或 {{HTMLElement("tr")}} 元素之后。注意,这与上述HTML5的标准相冲突。
Permitted ARIA roles任意。
DOM 接口{{domxref("HTMLTableSectionElement")}}
+ +

属性

+ +

此元素包含 全局属性.

+ +
+
{{htmlattrdef("align")}} {{Deprecated_inline}} in {{HTMLVersionInline("4")}}, {{obsolete_inline}} in {{HTMLVersionInline("5")}}
+
+

此枚举属性指定每个单元格内容所使用的水平对齐方式。可选值为:

+ +
    +
  • left,单元格内容左对齐
  • +
  • center,单元格内容居中对齐
  • +
  • right,单元格内容右对齐
  • +
  • justify,插入空白调整单元格中的文本内容(译者注:即两端对齐)
  • +
  • char,将文本内容与一个具有最小偏移量的特定字符对齐,字符和偏移量分别由{{htmlattrxref("char", "tbody")}}和{{htmlattrxref("charoff", "tbody")}}属性定义。{{unimplemented_inline("2212")}}.
  • +
+ +

若此值未设置,则假定为left

+ +
+

Note: 此属性在最新标准中已被废弃(不支持),所以请勿使用。

+ +
    +
  • 为达到与left, center, rightjustify相同的效果,请使用CSS {{cssxref("text-align")}}属性。
  • +
  • 为达到与char值相同的效果,在CSS3中可将{{htmlattrxref("char", "tfoot")}}的值用作{{cssxref("text-align")}}的属性值{{unimplemented_inline}}。
  • +
+
+
+
+ +
+
{{htmlattrdef("bgcolor")}} {{Non-standard_inline}}
+
此属性定义了列内单元格的背景色。定义此属性使用'#'作为前缀,其后是定义于sRGB的6位十六进制码。 +

也可使用以下16种预定义的色彩字符串之一:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 black = "#000000" green = "#008000"
 silver = "#C0C0C0" lime = "#00FF00"
 gray = "#808080" olive = "#808000"
 white = "#FFFFFF" yellow = "#FFFF00"
 maroon = "#800000" navy = "#000080"
 red = "#FF0000" blue = "#0000FF"
 purple = "#800080" teal = "#008080"
 fuchsia = "#FF00FF" aqua = "#00FFFF"
+ +
Usage Note: 请勿使用此属性,因为这并非标准,且只有某些特定版本的Microsoft Internet Explorer(IE浏览器)支持:{{HTMLElement("tfoot")}}元素应使用CSS设计。若想得到与bgcolor属性相似的效果,可在相关的 {{HTMLElement("td")}}或{{HTMLElement("th")}}元素中使用CSS {{cssxref("background-color")}}属性。
+
+
+ +
+
{{htmlattrdef("char")}} {{Deprecated_inline}} in {{HTMLVersionInline("4")}}, {{obsolete_inline}} in {{HTMLVersionInline("5")}}
+
此属性设置单元格对齐的基准字符。当对齐数字或货币值时,一个典型值会带有一个句点(.)。如果{{htmlattrxref("align", "tfoot")}}未设置为char,此属性将被忽略。 +
Note: 请勿使用此属性,因为在最新标准中此属性被废弃(且不受支持)。想要达到与{{htmlattrxref("char", "tbtfootody")}}相同的效果,在CSS3中,可将{{cssxref("text-align")}}属性设置为{{htmlattrxref("char", "tfoot")}}的属性值{{unimplemented_inline}}。
+
+
+ +
+
{{htmlattrdef("charoff")}} {{Deprecated_inline}} in {{HTMLVersionInline("4")}}, {{obsolete_inline}} in {{HTMLVersionInline("5")}}
+
此属性用作表明列内数据对于对齐基准字符的偏移字符数,对其基准字符由char属性指定。 +
Note: 请勿使用此属性,因为在最新标准中此属性被废弃(且不受支持)。
+
+
+ +
+
{{htmlattrdef("valign")}} {{Deprecated_inline}} in {{HTMLVersionInline("4")}}, {{obsolete_inline}} in {{HTMLVersionInline("5")}}
+
此属性指定表头(译者注:英文原文为table header,疑似错误)中每一行内的文本的垂直对齐方式。此属性的可选值为: +
    +
  • baseline,会使文本尽可能接近单元格底部,但并不向底部对齐,而将它们以字符基线对齐。如果所有字符的大小相同,此值与bottom的效果相同;
  • +
  • bottom,设置文本向下对齐;
  • +
  • middle,设置文本居中对齐;
  • +
  • and top,设置文本向上对齐。
  • +
+ +
Note: 请勿使用此属性,因为在最新标准中此属性被废弃(且不受支持):使用CSS属性{{cssxref("vertical-align")}}作为替代。
+
+
+ +

示例

+ +

请查看{{HTMLElement("table")}}页面中<tfoot>的相关示例。

+ +

规范

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','tables.html#the-tfoot-element','tfoot element')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C','tabular-data.html#the-tfoot-element','tfoot element')}}{{Spec2('HTML5 W3C')}} 
+ +

浏览器兼容性

+ + + +

{{Compat("html.elements.tfoot")}}

+ +

参见

+ + + +

{{HTMLRef}}

-- cgit v1.2.3-54-g00ecf