CSS3 border-image-slice property
Examples
Inwardly offset boundary specified image:
div
{
border-image-source: url(border.png);
border-image-slice: 50% 50%;
}
{
border-image-source: url(border.png);
border-image-slice: 50% 50%;
}
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
border-image-slice | 15.0 | 11.0 | 15.0 | 6.0 | 15.0 |
Attribute definitions and instructions
border-image -slice attribute specifies the image boundary inwardly offset.
Defaults: | 100% |
---|---|
inherit: | no |
version: | CSS3 |
JavaScript syntax: | object .style.borderImageSlice = "50% 50%" |
grammar
border-image-slice:number|%|fill;
Note: This attribute specifies the image at the top, right, bottom, left edge inward migration, divided into nine regions: four corners, four sides and middle.Intermediate image will be discarded (fully transparent process), unless fill in keywords. If you omit the fourth number / percentage of it, and the second the same. If you also omit the third, and it is the same as the first. If you also omit the second, and it is the same as the first.
value | Explanation |
---|---|
number | Digital representation of the image pixel (bitmap images) or vector coordinates (if the image is a vector image) |
% | The percentage of the image size is relative: the height of the horizontal width of the image offset, vertical offset image |
fill | Reserved intermediate portion of the image |