Styl borderImage Vlastnost
Příklad
Určete obrázek jako ohraničení kolem prvku <div>:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
Definice a použití
Vlastnost borderImage je zkrácená vlastnost pro nastavení vlastností borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset a borderImageRepeat .
Vynechané hodnoty jsou nastaveny na výchozí hodnoty.
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Čísla následovaná Webkit, Moz nebo O určují první verzi, která pracovala s předponou.
Property | |||||
---|---|---|---|---|---|
borderImage | 16.0 4.0 Webkit |
11.0 | 15.0 3.5 Moz |
6.0 3.1 Webkit |
15.0 11.0 O |
Syntax
Vraťte vlastnost borderImage:
object.style.borderImage
Nastavte vlastnost borderImage:
object.style.borderImage = "source slice width outset repeat|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | žádný 100% 1 0 roztáhnout |
---|---|
Návratová hodnota: | Řetězec představující vlastnost border-image prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost border-image