CSS background-clip Property






<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->




CSS background-clip Property



Previous
Complete CSS Reference
Next



Example


Specify how far the background should extend within an element:



div
{
    border: 10px dotted black;
    padding: 15px;
    background:
lightblue;
    background-clip:
padding-box;
}

Try it Yourself »



Definition and Usage


The background-clip property defines how far the background (color or image)
should extend within an element.
























Default value: border-box
Inherited: no
Animatable: no. Read about animatable
Version: CSS3
JavaScript syntax: object.style.backgroundClip="content-box"
Try it




Browser Support


The numbers in the table specify the first browser version that fully supports the property.




















Property
background-clip 4.0 9.0 4.0 3.0 10.5







<!--
mid_content, all: [300,250][336,280][728,90][970,250][970,90][320,50][468,60]
-->





CSS Syntax



background-clip: border-box|padding-box|content-box|initial|inherit;


Property Values


































Value Description Play it
border-box Default value. The background extends behind the border Play it »
padding-box The background extends to the inside edge of the border Play it »
content-box The background extends to the edge of the content box Play it »
initial Sets this property to its default value. Read about initial
Play it »
inherit Inherits this property from its parent element. Read about inherit





Related Pages


CSS tutorial: CSS Backgrounds


HTML DOM reference: backgroundClip property




Previous
Complete CSS Reference
Next

Popular posts from this blog

Chat program with C++ and SFML

Function to Return a JSON Like Objects Using VBA Collections and Arrays

Will my employers contract hold up in court?