hasLayout in Microsoft Internet Explorer

hasLayout Property


Retrieves a value that indicates whether the object has layout.

Syntax

HTML N/A
Scripting [ sHasLayout = ] object.currentStyle.hasLayout

Possible Values

sHasLayout Boolean that receives one of the following values.
false Default. Object does not have layout.
true Object has layout.

The property is read-only. The property has a default value of false. The Microsoft Cascading Style Sheets (CSS) extension is not inherited.

Remarks

The following table shows Cascading Style Sheets (CSS) properties and corresponding values that, if set, cause an element to have layout.

CSS property Value
display inline-block
height any value
float left or right
position absolute
width any value
writing-mode tb-rl
zoom any value

As of Microsoft® Internet Explorer 6, when the !DOCTYPE declaration specifies strict standards compliance, inline elements will ignore the width and height properties, and setting the width and height properties will not cause the element to have layout.

Setting the contentEditable property to true will cause an element to have layout.

BODY, FIELDSET, IMG, INPUT, TABLE and TD elements always have layout.

 

当hasLayout为false的元素中包含了hasLayout为true的元素时,该子元素在应 用position类型的样式时将会遇到兼容问题。

 

当 hasLayout为false的元素应用position类型的样式时,将会遇到兼容问题。

 

See also:

background与 border的恩怨情仇

http://www.jslab.org.cn/?tag=hasLayoutBug



评论: 0 | 引用: 0 | 查看次数: 528
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 关闭 | [img]标签 关闭