English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-image-The width CSS property specifies the width of the border.
The following table provides the usage instructions and version history of this property, as well as the syntax for using it in JavaScript scripts.
Default value: | 1 |
---|---|
Applies to: | This property can be applied to any element, but when it comes to table elements (such as tr, th, td), the border-When the collapse attribute value is collapse, border-image-The width attribute is invalid. It also applies to::first-letter. |
Inheritance: | No |
Can be animated: | No.Please see Animation properties. |
Version: | CSS3new feature |
JavaScript syntax: | object.style.borderImageWidth="30 30" |
The syntax of this attribute is as follows:
border-image-width: [ length | percentage | number | auto ] 1 to 4 values | initial | inherit
The following examples demonstrate how to use border-image-width attribute.
.box { width: 300px; height: 150px; border-image-source: url("border.png"); border-image-width: 10px; border-image-slice: 30; border-image-repeat: round; }Test and see‹/›
The following table describes the value of this attribute.
Value | Description |
---|---|
length | Specify the border width in absolute or relative units. |
percentage | Specify the border width in percentage of the element. |
number | represents the elementborder-widthThe calculated value of the attribute or a multiple of the border width. |
auto | Specify the border image width as the inherent width or height of the corresponding image slice. |
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 width attribute. |
border-image-The compatibility of width attribute in browsers, the numbers in the table below represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS3 BorderandCSS Border.
Related attributes:border-image,border-image-source,border-image-repeat,border-image-slice,border-image-outset,border.