最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

width Attribute | width Property

Internet Development Index

Sets or retrieves the width of the object.

What's New for Microsoft® Internet Explorer 6

When you use the !DOCTYPE declaration to specify standards-compliant mode, this property specifies only the distance between the left and right edges of the content box—that is, within the padding.

Syntax

HTML { width : sWidth }
Scriptingobject.style.width [ = sWidth ]

Possible Values

sWidthVariant that specifies or receives one of the following values.
autoDefault. Default width of the object.
widthFloating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For more information about the supported length units, see CSS Length Units.
percentageInteger, followed by a %. The value is a percentage of the width of the parent object, whether or not it is specified explicitly. Negative values are not allowed.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of auto. The Cascading Style Sheets (CSS) attribute is not inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

  As of Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, this property specifies the distance between the left and right edges of the content box—that is, within the padding.

When the !DOCTYPE declaration does not specify standards-compliant mode, and with earlier versions of Internet Explorer, this property includes the object's content box, plus the values of the following properties: borderLeft, borderRight, paddingLeft, and paddingRight. Subtracting the sum of the values of these properties from the value of the width property equals the width of the parent object's content box.

To perform operations on the numeric value of this property, use pixelWidth or posWidth.

For more information about how to access the dimension and location of elements on the page through the Dynamic HTML (DHTML)燚ocument Object Model (DOM), see Measuring Element Dimension and Location.

Examples

This example uses an inline style sheet to set the width of an image.The following examples use the width attribute and the width property to change the width of the object.

<DIV STYLE="position:absolute;top:10px;left:10px;width:1in">
. . . </DIV>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

This example uses inline scripting to set the width of an image when an onclick event occurs.

<IMG SRC="sphere.jpg" onclick="this.style.width='1cm'"
ondblclick="this.style.width=''">
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link and is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, currentStyle, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, hn, HR, I, INS, KBD, LABEL, LEGEND, LI, LISTING, MENU, NOBR, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TEXTAREA, TT, U, UL, VAR, XMP

See Also

CSS Enhancements in Internet Explorer 6, Measuring Element Dimension and Location
黑河市| 盐源县| 明光市| 吉林省| 逊克县| 泰和县| 紫金县| 太保市| 天门市| 乌拉特中旗| 大田县| 黄龙县| 福清市| 涪陵区| 东乌珠穆沁旗| 喀喇沁旗| 安吉县| 岳池县| 昌吉市| 高邮市| 祁东县| 彝良县| 桦川县| 塔河县| 栾川县| 绵阳市| 尼玛县| 白水县| 佛学| 乌兰浩特市| 延寿县| 茂名市| 绵阳市| 顺昌县| 大埔区| 治多县| 嘉黎县| 大连市| 阆中市| 兴安盟| 吉首市|