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

top Attribute | top Property

Internet Development Index

Sets or retrieves the position of the object relative to the top of the next positioned object in the document hierarchy.

Syntax

HTML { top : sTop }
Scriptingobject.style.top [ = sTop ]

Possible Values

sTopVariant that specifies or receives one of the following values:
autoDefault. Default position according to the regular HTML layout of the page.
lengthFloating-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 Reference.
percentageInteger, followed by a percent sign (%). This value is a percentage of the height of the parent object.

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

The top attribute should be used only when the position attribute is set; otherwise, the value of the top attribute is ignored.

Because the value of the top property is a string, you cannot use the property in script to calculate the position of the object in the document; instead, use the pixelTop or the posTop property.

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

Examples

The following examples use the top attribute and the top property to change the position of the object.

This example uses an inline style to set the position of a div object.

<DIV STYLE="position:absolute;top:100px">
. . . </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 script to change the position of the image set by an inline style. The change occurs during onmouseover and onmouseout events.

<IMG SRC="cone.jpg" STYLE="position:absolute;
top:80px;" onmouseover="this.style.top='100px''"
onmouseout="this.style.top='80px'" >
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 Cascading Style Sheets (CSS), Level 2 (CSS2) Non-Microsoft link.

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BUTTON, CENTER, CITE, CODE, currentStyle, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, hn, HR, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP

See Also

pixelTop, posTop
吉林省| 堆龙德庆县| 隆林| 桂阳县| 鄂托克前旗| 德格县| 临邑县| 桂平市| 千阳县| 河北区| 中西区| 沭阳县| 松滋市| 云林县| 遂昌县| 抚松县| 巴林左旗| 方正县| 南丰县| 宜黄县| 东至县| 广灵县| 曲周县| 攀枝花市| 汾西县| 宣威市| 郁南县| 阜新| 吉木乃县| 石河子市| 广宗县| 桑植县| 和林格尔县| 金平| 喀什市| 尼木县| 金乡县| 绍兴县| 马尔康县| 密山市| 泰和县|