Style borderWłaściwość obrazu
Przykład
Określ obraz jako ramkę wokół elementu <div>:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
Definicja i użycie
Właściwość borderImage jest skróconą właściwością służącą do ustawiania właściwości borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset i borderImageRepeat .
Pominięte wartości są ustawiane na wartości domyślne.
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Liczby, po których następuje Webkit, Moz lub O, określają pierwszą wersję, która działała z przedrostkiem.
Property | |||||
---|---|---|---|---|---|
borderImage | 16.0 4.0 Webkit |
11.0 | 15.0 3.5 Moz |
6.0 3.1 Webkit |
15.0 11.0 O |
Składnia
Zwróć właściwość borderImage:
object.style.borderImage
Ustaw właściwość borderImage:
object.style.borderImage = "source slice width outset repeat|initial|inherit"
Wartości nieruchomości
Value | Description |
---|---|
borderImageSource | The path to the image to be used as a border |
borderImageSlice | The inward offsets of the image-border |
borderImageWidth | The widths of the image-border |
borderImageOutset | The amount by which the border image area extends beyond the border box |
borderImageRepeat | Whether the image-border should be repeated, rounded or stretched |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Szczegóły techniczne
Domyślna wartość: | brak 100% 1 0 rozciągliwość |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość border-image elementu |
Wersja CSS | CSS3 |
Powiązane strony
Odniesienie CSS: właściwość border-image