background-image property
Specifies the image to use as the background of the object.
JavaScript page for this property: backgroundImage. You can find other example(s) there. |
Possible values:
One of the following values:
Where URI specifies the location of the image file. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Default. Specifies that the current element does not have a background image. |
Default: none.
Example HTML code 1:
This example illustrates the use of the background-image property:
|
||||
<head> <style> .example { background-image: url("bg.jpg"); background-repeat: repeat; width: 300px; height: 200px; overflow: scroll; } </style> </head> <body> <div class="example"> Some content ..... <br /> ..... <br /> ..... <br /> Some content ..... <br /> ..... <br /> ..... <br /> Some content ..... <br /> ..... <br /> ..... <br /> Some content ..... <br /> ..... <br /> ..... <br /> </div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, b, bdo, big, blink, blockQuote, body, button, caption, center, cite, code, col, colGroup, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, frame, frameSet, H1, H2, H3, H4, H5, H6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, label, legend, li, listing, marquee, menu, nobr, ol, p, plainText, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp
Related pages:
background
background-attachment
background-color
background-position
background-position-x
background-position-y
background-repeat
background-attachment
background-color
background-position
background-position-x
background-position-y
background-repeat
External links:
background-image (MSDN)
background-image (Mozilla Developer Center)
background-image (Safari Reference Library)
background-image (W3C)
background-image (Mozilla Developer Center)
background-image (Safari Reference Library)
background-image (W3C)
User Contributed Comments