Proprietà CSS clip di sfondo
Esempio
Specifica fino a che punto deve estendersi lo sfondo all'interno di un elemento:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
Definizione e utilizzo
La background-clip
proprietà definisce fino a che punto lo sfondo (colore o immagine) deve estendersi all'interno di un elemento.
Valore di default: | scatola di confine |
---|---|
Ereditato: | no |
Animabile: | no. Leggi su animabile |
Versione: | CSS3 |
sintassi JavaScript: | oggetto .style.backgroundClip="content-box" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
Sintassi CSS
background-clip: border-box|padding-box|content-box|initial|inherit;
Valori di proprietà
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 |
Pagine correlate
Tutorial CSS: sfondi CSS
Riferimento HTML DOM: proprietà backgroundClip