English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-image-The source CSS attribute specifies the position of the image to be used for the border, rather thanborder-styleThe border style specified by the attribute.
The following table provides usage instructions and version history of this attribute, as well as its usage syntax in JavaScript scripts.
Default value: | none |
---|---|
Applies to: | This attribute can be applied to any element, but when the border of the table element (such as tr, th, td) is-When the collapse attribute value of border is collapse,-image-The source attribute is invalid. It also applies to::first-letter. |
Inheritance: | No |
Can be animated: | No.See also Animation properties. |
Version: | CSS3new feature |
JavaScript syntax: | object.style.borderImageSource="url(border.png)" |
The syntax of this attribute is as follows:
border-image-source: none | image | initial | inherit
The following examples demonstrate how to use border-image-source attribute.
.box { width: 300px; height: 150px; border-image-source: url("border.png"); border-image-slice: 30; border-image-repeat: round; }Test and see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
none | If there is no border image, the border style will be used. This is the default value. |
image | Specify the position of the border image. |
initial | Set this property to its default value. |
inherit | If specified, the associated element uses its parent element's border-image-The calculated value of the source attribute. |
border-image-Browser compatibility of the source attribute, the numbers in the following table indicate the minimum version number of the browser that supports this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS3 BorderandCSS Border.
Related properties:border-image,border-image-width,border-image-repeat,border-image-slice,border-image-outset,border.