Style border Właściwość ImageSlice
Przykład
Określ wewnętrzne przesunięcia obramowania obrazu:
document.getElementById("myDIV").style.borderImageSlice = "50% 10%";
Definicja i użycie
Właściwość borderImageSlice określa wewnętrzne przesunięcia obramowania obrazu.
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 | |||||
---|---|---|---|---|---|
borderImageSlice | Yes | 11.0 | Yes | 6.0 | 15.0 11.0 O |
Zamiast tego spójrz na właściwość borderImage !
Składnia
Zwróć właściwość borderImageSlice:
object.style.borderImageSlice
Ustaw właściwość borderImageSlice:
object.style.borderImageSlice = "number|%|fill|initial|inherit"
Wartości nieruchomości
Value | Description |
---|---|
number | Numbers represent pixels in the image (if the image is a raster image) or vector coordinates (if the image is a vector image) |
% | Percentages are relative to the size of the image: the width of the image for the horizontal offsets, the height for vertical offsets. Default value is 100% |
fill | Causes the middle part of the border-image to be preserved |
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ść: | 100% |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość border-image-slice elementu |
Wersja CSS | CSS3 |
Powiązane strony
Odniesienie CSS: właściwość border-image-slice