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

background Attribute | background Property

Internet Development Index

Sets or retrieves up to five separate background properties of the object.

Syntax

HTML { background : sBackground }
Scriptingobject.style.background [ = sBackground ]

Possible Values

sBackgroundString that specifies or receives up to five of the following space-delimited values, in any order:
colorAny of the range of color values available to the backgroundColor property.
imageAny of the range of image values available to the backgroundImage property.
repeatAny of the range of repeat values available to the backgroundRepeat property.
attachmentAny of the range of attachment values available to the backgroundAttachment property.
positionAny of the range of position values available to the backgroundPosition property.

The property is read/write. The property has a default value of transparent none repeat scroll 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

The background property is a composite property. Separate properties can be used to specify each property, but in many cases it is more convenient to set them in one place using this composite property.

Individual background properties not set by the composite background property are set to their default values. For example, the default value for image is none. Setting background: white is equivalent to setting background: white?SPAN CLASS="clsLiteral">none?SPAN CLASS="clsLiteral">repeat?SPAN CLASS="clsLiteral">scroll?SPAN CLASS="clsLiteral">0%?SPAN CLASS="clsLiteral">0%. So, in addition to setting the background color to white, setting background: white clears any image, repeat, attachment, or position values previously set.

The background properties render in the object's content and padding; however, borders are set using the border properties.

In Microsoft® Internet Explorer 3.0, elements that expose the background property only support the color and image values; the attachment value is only supported by the body, table, and td elements. In block elements, such as p and div, background images and colors appear only behind text in Internet Explorer 3.0; in Internet Explorer 4.0 and later, backgrounds stretch from margin to margin when used with block elements.

Although objects do not inherit the background property, the background image or color of an object's parent appears behind an object if a background is not specified.

For more information about supported colors, see the Color Table.

Examples

The following examples use the background property and the background attribute to set the background values.

This example uses inline event handlers to modify the background-color and background-position attributes of an image. These attributes are specified in an embedded style sheet using the background attribute.

<STYLE>
.style1{background:beige url(sphere.jpg) no-repeat top center}
.style2{background:ivory url(sphere.jpeg) no-repeat bottom right}
</STYLE>
</HEAD>
<BODY>
<SPAN onmouseover="this.className='style1'"
onmouseout="this.className='style2'">
. . .  </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 inline scripting to modify the backgroundColor and backgroundPosition properties of an image.

<SPAN onclick="this.style.background='beige url(sphere.jpeg)
no-repeat top center'">
. . . </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.

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, 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, NOBR, 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
公主岭市| 台中市| 兴化市| 鸡泽县| 游戏| 房产| 汉川市| 宁安市| 开江县| 九江县| 舟曲县| 资中县| 原平市| 岑溪市| 章丘市| 长顺县| 和政县| 交城县| 三明市| 兴宁市| 山东| 理塘县| 汤阴县| 静宁县| 武宁县| 宁明县| 西盟| 诏安县| 乐平市| 鄂尔多斯市| 崇仁县| 富平县| 池州市| 五河县| 邮箱| 遵义市| 民县| 罗平县| 星子县| 兴隆县| 靖州|