Vlastnost stylu borderImageSlice
Příklad
Určete vnitřní odsazení okraje obrázku:
document.getElementById("myDIV").style.borderImageSlice = "50% 10%";
Definice a použití
Vlastnost borderImageSlice určuje vnitřní odsazení okraje obrazu.
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Property | |||||
---|---|---|---|---|---|
borderImageSlice | Yes | 11.0 | Yes | 6.0 | 15.0 11.0 O |
Místo toho se podívejte na vlastnost borderImage !
Syntax
Vraťte vlastnost borderImageSlice:
object.style.borderImageSlice
Nastavte vlastnost borderImageSlice:
object.style.borderImageSlice = "number|%|fill|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | 100% |
---|---|
Návratová hodnota: | Řetězec představující vlastnost border-image-slice prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost border-image-slice