-o-background-size property | -webkit-background-size property
-o-background-size: | ||||||
-webkit-background-size: |
Sets the size of the background image.
JavaScript page for this property: OBackgroundSize | webkitBackgroundSize. You can find other example(s) there. |
Possible values:
One of the following values: | ||||||||||||||||||||||
|
Description of values:
Default. The size of the background image is equal to the size of the original image. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
The width and height properties of the background images are rounded down to show images of approximately the same size. | |||||||
The size of the background image in length units. For the supported length units, see the length page. | |||||||
The size is the specified percentage of the size of the background positioning area. |
Default: auto.
If only one size value is specified, it affects the horizontal and vertical size, too.
Example HTML code 1:
This example illustrates the use of the -o-background-size and -webkit-background-size properties:
|
||||
<head> <style> .resBg { padding: 30px; background: url("area.gif") no-repeat; border: 4px dotted green; -o-background-size: 60px 60px; -webkit-background-size: 60px 60px; } </style> </head> <body> <div class="resBg">A division with a resized background image</div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockQuote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, 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:submit, input:text, ins, isIndex, kbd, label, legend, li, marquee, menu, object, ol, p, plainText, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp, input:search
Related pages:
External links:
User Contributed Comments