CSS agtergrond-snit Eiendom
Voorbeeld
Spesifiseer hoe ver die agtergrond binne 'n element moet strek:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
Definisie en gebruik
Die background-clip
eienskap definieer hoe ver die agtergrond (kleur of beeld) binne 'n element moet strek.
Standaard waarde: | grens-boks |
---|---|
Geërf: | geen |
Animateerbaar: | geen. Lees oor animeerbaar |
Weergawe: | CSS3 |
JavaScript-sintaksis: | voorwerp .style.backgroundClip="content-box" |
Blaaierondersteuning
Die nommers in die tabel spesifiseer die eerste blaaierweergawe wat die eiendom ten volle ondersteun.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
CSS-sintaksis
background-clip: border-box|padding-box|content-box|initial|inherit;
Eiendomswaardes
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 |
Verwante bladsye
CSS-tutoriaal: CSS-agtergronde
HTML DOM verwysing: backgroundClip eiendom