You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > webkitBackgroundComposite
webkitBackgroundComposite style property
Sets or retrieves the compositing style for an element's background image and color.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -webkit-background-composite |
Possible values:
The type of this property is string.
One of the following values:
The background extends into the border of the element. | |||||||
Ignore both background image and color settings. | |||||||
Ignore background color settings. | |||||||
The background color is over the background image. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
The background does not extend into the border. | |||||||
Default. The background image is over the background color. | |||||||
Default: source-over.
Example HTML code 1:
This example illustrates the use of the -webkit-background-composite property:
|
||||
<head> <style> .common { width: 100px; height: 100px; margin: 10px; background-color: rgba(0, 0, 255, 0.4); background-image: url("border.png"); background-repeat: no-repeat; background-position: 50% 50%; color: #ffffff; float: left; } .clear { -webkit-background-composite: clear; } .copy { -webkit-background-composite: copy; } .source_over { -webkit-background-composite: source-over; } .dest_over { -webkit-background-composite: destination-over; } </style> </head> <body> <div class="common clear">clear</div> <div class="common copy">copy</div> <div class="common source_over">source-over</div> <div class="common dest_over">destination-over</div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.style
HTML elements:
a, abbr, acronym, address, applet, b, bdo, big, 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:search, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, object, ol, p, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments