diff options
Diffstat (limited to 'files/zh-cn/web/html/element/aside')
| -rw-r--r-- | files/zh-cn/web/html/element/aside/index.html | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/aside/index.html b/files/zh-cn/web/html/element/aside/index.html new file mode 100644 index 0000000000..9f61c067cf --- /dev/null +++ b/files/zh-cn/web/html/element/aside/index.html @@ -0,0 +1,108 @@ +--- +title: <aside> +slug: Web/HTML/Element/aside +tags: + - HTML + - HTML5 + - 元素 +translation_of: Web/HTML/Element/aside +--- +<p><span class="seoSummary"><strong>HTML <code><aside></code> 元素</strong>表示一个和其余页面内容几乎无关的部分,被认为是独立于该内容的一部分并且可以被单独的拆分出来而不会使整体受影响。</span>其通常表现为侧边栏或者标注框(call-out boxes)。</p> + +<div>{{EmbedInteractiveExample("pages/tabbed/aside.html", "tabbed-standard")}}</div> + +<p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples </a> and send us a pull request.</p> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="/zh-CN/docs/HTML/Content_categories" title="HTML/Content_categories">内容分类</a></th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#流式元素(Flow_content)" title="HTML/Content categories#Flow content">流式元素</a>, <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#章节元素(Sectioning_content)">章节元素</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Palpable_content">可触摸内容</a>.</td> + </tr> + <tr> + <th scope="row">允许的内容</th> + <td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#流式元素(Flow_content)" title="HTML/Content categories#Flow content">流式元素</a>.</td> + </tr> + <tr> + <th scope="row">标签省略</th> + <td>{{no_tag_omission}}</td> + </tr> + <tr> + <th scope="row">允许的父元素</th> + <td>所有元素接受流式元素。注意 <code><aside></code> 不能是{{HTMLElement("address")}} 元素的后代</td> + </tr> + <tr> + <th scope="row">允许的ARIA角色</th> + <td>{{ARIARole("feed")}}, {{ARIARole("note")}}, {{ARIARole("presentation")}}, {{ARIARole("region")}}, {{ARIARole("search")}}</td> + </tr> + <tr> + <th scope="row">DOM 接口</th> + <td>{{domxref("HTMLElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="属性">属性</h2> + +<p>此元素只有<a href="https://developer.mozilla.org/zh-CN/docs/HTML/Global_attributes">全局属性</a>。</p> + +<h2 id="使用说明">使用说明</h2> + +<ul> + <li>不要使用 <code><aside></code> 元素去尾随括号内的文本 ,因为这种文本被认为是主要流内容的一部分。</li> +</ul> + +<h2 id="示例">示例</h2> + +<pre class="brush: html"><article> + <p> + 迪斯尼电影<cite>海的女儿</cite>(<cite>The Little Mermaid</cite>)于 1989 年首次登上银幕。 + </p> + <aside> + 在首次发行期间,该片便收获了 8700 万美元的票房。 + </aside> + <p> + 更多有关该电影的信息… + </p> +</article></pre> + +<p>{{EmbedLiveSample("Examples")}}</p> + +<h2 id="标准">标准</h2> + +<table class="standard-table" style="font-size: 14px; font-weight: normal; line-height: 1.5;"> + <thead> + <tr> + <th scope="col">标准</th> + <th scope="col">状态</th> + <th scope="col">备注</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'sections.html#the-aside-element', '<aside>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'sections.html#the-aside-element', '<aside>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("html.elements.aside")}}</p> + +<h2 id="参见">参见</h2> + +<ul> + <li>Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("article")}}, {{HTMLElement("section")}}, {{HTMLElement("nav")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};</li> + <li><a href="/zh-CN/docs/Web/Guide/HTML/Sections_and_Outlines_of_an_HTML5_document">使用 HTML 章节与大纲</a></li> +</ul> + +<div>{{HTMLRef}}</div> |
