HTMLDivElement

HTMLDivElement 接口提供了一些特殊属性(它也继承了通常的 HTMLElement 接口)来操作 <div> 元素。

属性

属性继承自父类,HTMLElement

HTMLDivElement.align
这是一个 DOMString 表示一个指示元素内容相对于周围内容的对齐方式的可枚举属性。可取的值有 "left""right""justify",和 "center"

方法

没有特有的方法;方法继承自父类,HTMLElement

规范

Specification Status Comment
HTML Living Standard
HTMLDivElement
Living Standard  
HTML5
HTMLDivElement
Recommendation No change from Document Object Model (DOM) Level 2 HTML Specification.
Document Object Model (DOM) Level 2 HTML Specification
HTMLDivElement
Obsolete No change from Document Object Model (DOM) Level 1 Specification.
Document Object Model (DOM) Level 1 Specification
HTMLDivElement
Obsolete Initial definition.

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
HTMLDivElementChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
align
Deprecated
Chrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

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

参见

  • 此HTML元素实现了这个接口:<div>