Stile borderImage Proprietà
Esempio
Specifica un'immagine come bordo attorno a un elemento <div>:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
Definizione e utilizzo
La proprietà borderImage è una proprietà abbreviata per l'impostazione delle proprietà borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset e borderImageRepeat .
I valori omessi vengono impostati sui valori predefiniti.
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
I numeri seguiti da Webkit, Moz o O specificano la prima versione che ha funzionato con un prefisso.
Property | |||||
---|---|---|---|---|---|
borderImage | 16.0 4.0 Webkit |
11.0 | 15.0 3.5 Moz |
6.0 3.1 Webkit |
15.0 11.0 O |
Sintassi
Restituisce la proprietà borderImage:
object.style.borderImage
Imposta la proprietà borderImage:
object.style.borderImage = "source slice width outset repeat|initial|inherit"
Valori di proprietà
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 |
Dettagli tecnici
Valore di default: | nessuno 100% 1 0 allungamento |
---|---|
Valore di ritorno: | Una stringa, che rappresenta la proprietà border-image di un elemento |
Versione CSS | CSS3 |
Pagine correlate
Riferimento CSS: proprietà border-image