CSS border-image-repeat Property
Przykład
Określ, jak powtórzyć obraz obramowania:
#borderimg
{
border-image-source: url(border.png);
border-image-repeat: repeat;
}
Definicja i użycie
Właściwość border-image-repeat
określa, czy obraz obramowania ma być powtórzony, zaokrąglony, rozłożony czy rozciągnięty.
Wskazówka: spójrz także na właściwość border-image (skrócona właściwość do ustawiania wszystkich właściwości border-image-*).
Domyślna wartość: | rozciągać |
---|---|
Dziedziczny: | nie |
Animowalny: | nie. Przeczytaj o animacji |
Wersja: | CSS3 |
Składnia JavaScript: | obiekt .style.borderImageRepeat="okrągły" |
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 | |||||
---|---|---|---|---|---|
border-image-repeat | 15.0 | 11.0 | 15.0 | 6.0 | 15.0 |
Składnia CSS
border-image-repeat: stretch|repeat|round|space|initial|inherit;
Uwaga: ta właściwość określa sposób skalowania i kafelkowania obrazów boków i środkowej części obrazu obramowania. Możesz więc podać tutaj dwie wartości. Jeśli druga wartość zostanie pominięta, zakłada się, że jest taka sama jak pierwsza.
Wartości nieruchomości
Value | Description | Play it |
---|---|---|
stretch | Default value. The image is stretched to fill the area | |
repeat | The image is tiled (repeated) to fill the area | |
round | The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so it fits | |
space | The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles | |
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: obrazy obramowania CSS
Dokumentacja CSS: właściwość border-image
CSS Reference: border-image-outset property
CSS Reference: właściwość border-image-slice
Dokumentacja CSS: właściwość border-image-source
CSS Reference: border-image-width property
Dokumentacja HTML DOM: właściwość borderImageRepeat