aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html/element/br
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/html/element/br
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/html/element/br')
-rw-r--r--files/zh-cn/web/html/element/br/index.html113
1 files changed, 113 insertions, 0 deletions
diff --git a/files/zh-cn/web/html/element/br/index.html b/files/zh-cn/web/html/element/br/index.html
new file mode 100644
index 0000000000..aa3e6ea144
--- /dev/null
+++ b/files/zh-cn/web/html/element/br/index.html
@@ -0,0 +1,113 @@
+---
+title: <br>
+slug: Web/HTML/Element/br
+translation_of: Web/HTML/Element/br
+---
+<p><strong>HTML &lt;br&gt; 元素</strong>在文本中生成一个换行(回车)符号。此元素在写诗和地址时很有用,这些地方的换行都非常重要。</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/en-US/docs/HTML/Content_categories">内容分类</a></th>
+ <td><a href="/en-US/docs/HTML/Content_categories#Flow_content">Flow content</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">允许的内容</th>
+ <td>无,这是一个{{Glossary("空元素")}}.</td>
+ </tr>
+ <tr>
+ <th scope="row">标签略写</th>
+ <td>必须有一个开始标签,并且一定不能有结束标签。在 XHTML中将元素写为 <code>&lt;br /&gt;</code>。</td>
+ </tr>
+ <tr>
+ <th scope="row">允许的父元素</th>
+ <td>任意可容纳 <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a> 的元素。</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted ARIA roles</th>
+ <td>任意</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM 接口</th>
+ <td>{{domxref("HTMLBRElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="属性">属性</h2>
+
+<p>此元素的属性包括<a href="/en-US/docs/HTML/Global_attributes">全局属性</a>。</p>
+
+<dl>
+ <dt>{{htmlattrdef("clear")}} {{deprecatedGeneric('inline','HTML4.01')}} {{obsoleteGeneric('inline','HTML5')}}</dt>
+ <dd>指定换行后下一行文本开始位置。
+ <div class="note">
+ <p><strong>使用注意: 此属性</strong>在 {{HTMLVersionInline(5)}} 中已被废弃,<strong>请勿使用</strong>。 请用 {{CSSxref('clear')}} 属性替代。</p>
+ </div>
+ </dd>
+</dl>
+
+<h2 id="注意">注意</h2>
+
+<p>不要用 <code>&lt;br&gt;</code> 来增加文本之间的行间隔;应使用 <a href="/en-US/docs/CSS">CSS</a> {{cssxref('margin')}} 属性或{{HTMLElement("p")}} 元素。</p>
+
+<h2 id="例子">例子</h2>
+
+<pre class="brush: html">Mozilla Foundation&lt;br&gt;
+1981 Landings Drive&lt;br&gt;
+Building K&lt;br&gt;
+Mountain View, CA 94043-0801&lt;br&gt;
+USA
+</pre>
+
+<p>The HTML above outputs:</p>
+
+<p>Mozilla Foundation<br>
+ 1981 Landings Drive<br>
+ Building K<br>
+ Mountain View, CA 94043-0801<br>
+ USA</p>
+
+<h2 id="技术规范">技术规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'semantics.html#the-br-element', '&lt;br&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-br-element', '&lt;br&gt;')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML4.01', 'struct/text.html#h-9.3.2.1', '&lt;br&gt;')}}</td>
+ <td>{{Spec2('HTML4.01')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("html.elements.br")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{HTMLElement("address")}} element</li>
+ <li>{{HTMLElement("p")}} element</li>
+</ul>
+
+<div>{{HTMLRef}}</div>