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

background-position Attribute | backgroundPosition Property

Internet Development Index

Sets or retrieves the position of the background of the object.

Syntax

HTML { background-position : sPosition }
Scriptingobject.style.backgroundPosition [ = sPosition ]

Possible Values

sPositionString that specifies or receives one or two of the following values.
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 (%). The value is a percentage of the width or height of the object.
vAlignmentVertical alignment value. Possible values include the following:
topVertical alignment is at the top.
centerVertical alignment is centered.
bottomVertical alignment is at the bottom.
hAlignmentHorizontal alignment value. Possible values include the following:
leftHorizontal alignment is to the left.
centerHorizontal alignment is centered.
rightHorizontal alignment is to the right.

The property is read/write. The property has a default value of 0% 0%. 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

If only one value is set, that value applies to the horizontal coordinate, and the vertical is set to 50%. If both values are set, the first value applies to the horizontal coordinate and the second value applies to the vertical.

Setting the values to 0% 0% positions the backgroundImage to the upper left corner of the element's content excluding the padding.

Specifying right center has the following effect: because right is assumed to be an x-coordinate direction, right overwrites the center value, and the background shifts right accordingly.

This property can be set with the other background properties using the background composite property.

Examples

The following examples use the background-position attribute and the backgroundPosition property to specify the position of a background image.

This example uses a call to an embedded (global) style sheet to move the sphere.

<STYLE>
.style1 { background-position:top center }
.style2 { background-position:bottom right }
</STYLE>
</HEAD>
<BODY onload="oSpan.className='style1'">
<SPAN STYLE="font-size:14; width:250;" ID="oSpan"
onmouseover="this.className='style2'" onmouseout="this.className='style1'">
. . . </SPAN>
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 an inline style to move the sphere.

<SPAN onmouseover="this.style.backgroundPosition='bottom right'">
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 1 (CSS1) Non-Microsoft link.

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, 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, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
东港市| 苍溪县| 甘泉县| 射阳县| 嘉黎县| 和政县| 中超| 海阳市| 泰安市| 宁德市| 绥棱县| 牙克石市| 卢湾区| 孟村| 香河县| 青铜峡市| 四子王旗| 湟中县| 裕民县| 祁阳县| 陵川县| 乃东县| 临泉县| 永寿县| 西充县| 拜泉县| 兴安县| 苏州市| 彭州市| 彰武县| 鄄城县| 嘉荫县| 贵阳市| 滦南县| 文成县| 吴旗县| 涞水县| 卢氏县| 通江县| 定远县| 宜章县|