Style borderImageSource attribute
- Forrige side
- Næste side
- Gå tilbage til forrige niveau HTML DOM Style Object
Definition and usage
borderImageSource
The attribute sets or returns the image to be used, not the border style given by the border-style attribute.
Tip:If the value is "none"
, or if the image cannot be displayed, the border style will be used.
See also:
CSS reference manual:border-image-source attribute
Example
Use an image as the border of the div element:
document.getElementById("myDIV").style.borderImageSource = "url(border.png)";
Syntax
Return borderImageSource attribute:
object.style.borderImageSource
Set borderImageSource attribute:
object.style.borderImageSource = "none|image|initial|inherit"
Attribute value
Value | Description |
---|---|
none | No image will be used. |
image | The path of the image to be used as the border. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | none |
---|---|
Return value: | String, representing the element's border-image-source attribute. |
CSS version: | CSS3 |
Browser supports
Talene i tabellen angiver den første browserversion, der fuldt ud understøtter egenskaben.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 11.0 | Support | 6.0 | 15.0 |
Se venligst borderImage egenskab!
- Forrige side
- Næste side
- Gå tilbage til forrige niveau HTML DOM Style Object