Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

<hr>

这篇翻译不完整。请帮忙从英语翻译这篇文章

HTML <hr> 元素表示段落级元素之间的话题转换。例如,一个故事中的场景的改变,或一个章节的主题的改变。在HTML的早期版本中,它是一个水平线。现在它仍能在可视化浏览器中表现为水平线,但就语义来界定其并不只是表明上的。

To change look of rule or gaps between it and paragraphs, use cascading style sheets.

特性

This element includes the global attributes.

align 
Sets the alignment of the rule on the page. If no value is specified, the default value is left.
color
Sets the color of the rule through color name or hexadecimal value.
noshade 
Sets the rule to have no shading.
size 
Sets the height, in pixels, of the rule.
width 
Sets the length of the rule on the page through a pixel or percentage value.

示例

<p>This is the first paragraph of text. This is the first paragraph of text.
  This is the first paragraph of text. This is the first paragraph of text.</p>

<hr>

<p>This is second paragraph of text. This is second paragraph of text.
  This is second paragraph of text. This is second paragraph of text.</p>

Above HTML will output:

This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.


This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
<hr>
Living Standard Definition of the hr element
WHATWG HTML Living Standard Living Standard Suggested default rendering of the hr element
HTML5
<hr>
Recommendation  
HTML 4.01 Specification
<hr>
Recommendation  

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 (Yes) (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)

相关内容

文档标签和贡献者

 此页面的贡献者: Ende93, pantao
 最后编辑者: Ende93,