CSS background-clip Eigenschap
Voorbeeld
Specificeer hoe ver de achtergrond zich binnen een element moet uitstrekken:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
Definitie en gebruik
De background-clip
eigenschap definieert hoe ver de achtergrond (kleur of afbeelding) zich binnen een element moet uitstrekken.
Standaardwaarde: | border-box |
---|---|
geërfd: | Nee |
Animeerbaar: | Nee. Lees over animeren |
Versie: | CSS3 |
JavaScript-syntaxis: | object .style.backgroundClip="content-box" |
Browserondersteuning
De getallen in de tabel geven de eerste browserversie aan die de eigenschap volledig ondersteunt.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
CSS-syntaxis
background-clip: border-box|padding-box|content-box|initial|inherit;
Eigendomswaarden
Value | Description | Play it |
---|---|---|
border-box | Default value. The background extends behind the border | |
padding-box | The background extends to the inside edge of the border | |
content-box | The background extends to the edge of the content box | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Gerelateerde pagina's
CSS-zelfstudie: CSS-achtergronden
HTML DOM-referentie: backgroundClip eigenschap