HTMLHRElement

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTMLHRElement 接口提供特定的属性(除了常规 HTMLElement 接口之外,它还可以通过继承来使用),用于操作 <hr> 元素。

EventTarget Node Element HTMLElement HTMLHRElement

实例属性

从其父接口 HTMLElement 继承属性。

HTMLHRElement.align 已弃用

表示枚举属性的字符串,指示分割线相对于周围上下文的对齐方式。

HTMLHRElement.color 已弃用

表示分割线颜色名称的字符串。

HTMLHRElement.noShade 已弃用

布尔值,将分割线设置为无阴影。

HTMLHRElement.size 已弃用

表示分割线高度的字符串。

HTMLHRElement.width 已弃用

表示页面上分割线宽度的字符串。

实例方法

没有特定的方法,从其父接口 HTMLElement 继承方法。

规范

Specification
HTML
# htmlhrelement

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
HTMLHRElement
align
Deprecated
color
Deprecated
noShade
Deprecated
size
Deprecated
width
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Deprecated. Not for use in new websites.

参见

  • 实现此接口的 HTML 元素:<hr>