CSS background-clip Property
Przykład
Określ, jak daleko powinno rozciągać się tło w elemencie:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
Definicja i użycie
Właściwość background-clip
określa, jak daleko powinno rozciągać się tło (kolor lub obraz) w elemencie.
Domyślna wartość: | ramka-pudełko |
---|---|
Dziedziczny: | nie |
Animowalny: | nie. Przeczytaj o animacji |
Wersja: | CSS3 |
Składnia JavaScript: | obiekt .style.backgroundClip="content-box" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
Składnia CSS
background-clip: border-box|padding-box|content-box|initial|inherit;
Wartości nieruchomości
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 |
Powiązane strony
Samouczek CSS: tła CSS
Dokumentacja HTML DOM: właściwość backgroundClip