diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/legend | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/legend')
-rw-r--r-- | files/zh-cn/web/html/element/legend/index.html | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/legend/index.html b/files/zh-cn/web/html/element/legend/index.html new file mode 100644 index 0000000000..a5e6e4cd2d --- /dev/null +++ b/files/zh-cn/web/html/element/legend/index.html @@ -0,0 +1,101 @@ +--- +title: <legend> +slug: Web/HTML/Element/legend +tags: + - Element + - HTML + - HTML 表单 + - 元素 + - 参考 + - 表单 +translation_of: Web/HTML/Element/legend +--- +<p>{{HTMLRef}}</p> + +<p><strong>HTML <legend></strong> 元素用于表示其父元素 {{HTMLElement("fieldset")}} 的内容标题。</p> + +<p>{{EmbedInteractiveExample("pages/tabbed/legend.html", "tabbed-standard")}}</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/en-US/docs/HTML/Content_categories">内容分类</a></th> + <td>无。</td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td><a href="https://developer.mozilla.org/zh-CN/docs/Web/Guide/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">语句内容(Phrasing content</a>)。</td> + </tr> + <tr> + <th scope="row">标签忽略</th> + <td>{{no_tag_omission}}</td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td>{{HTMLElement("fieldset")}} ,并且<code><legend></code>作为第一个子元素</td> + </tr> + <tr> + <th scope="row">Implicit ARIA role</th> + <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">No corresponding role</a></td> + </tr> + <tr> + <th scope="row">Permitted ARIA roles</th> + <td>No <code>role</code> permitted</td> + </tr> + <tr> + <th scope="row">DOM 接口</th> + <td>{{domxref("HTMLLegendElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="属性"><span style="">属性</span></h2> + +<p><br> + <span style="line-height: 21px;">这个元素只有</span><a href="https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">全局属性</a>。</p> + +<h2 id="示例">示例</h2> + +<p>在 {{HTMLElement("form")}} 中查看关于 <code><legend></code> 元素的示例。</p> + +<h2 id="Specifications" name="Specifications">规范</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">注释</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("HTML WHATWG", "forms.html#the-legend-element", "<legend>")}}</td> + <td>{{Spec2("HTML WHATWG")}}</td> + <td>Definition of the <code>legend</code> element</td> + </tr> + <tr> + <td>{{SpecName("HTML5 W3C", "sec-forms.html#the-legend-element", "<legend>")}}</td> + <td>{{Spec2("HTML5 W3C")}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName("HTML4.01", "interact/forms.html#h-17.10", "<legend>")}}</td> + <td>{{Spec2("HTML4.01")}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容">浏览器兼容</h2> + +<p>{{Compat("html.elements.legend")}}</p> + +<h2 id="另请参阅"><span style="">另请参阅</span></h2> + +<div id="compat-mobile"></div> + +<ul> + <li>其他与表单相关的元素:{{HTMLElement("form")}}, {{HTMLElement("option")}}, {{HTMLElement("label")}}, {{HTMLElement("button")}}, {{HTMLElement("select")}}, {{HTMLElement("datalist")}}, {{HTMLElement("optgroup")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("textarea")}}, {{HTMLElement("keygen")}}, {{HTMLElement("input")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}} 和 {{HTMLElement("meter")}}。</li> + <li><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Form_Role">ARIA: Form role</a></li> +</ul> |