border-image-repeat
border-image-repeat 定义图片如何填充边框。或为单个值,设置所有的边框;或为两个值,分别设置水平与垂直的边框。
| 初始值 | stretch |
|---|---|
| 适用元素 | all elements, except internal table elements when border-collapse is collapse. It also applies to ::first-letter. |
| 是否是继承属性 | 否 |
| 计算值 | as specified |
| Animation type | discrete |
Syntax
Values
- type
-
stretch,repeat,round,space选一。属于单个值的情况。 - horizontal
-
stretch,repeat,round,space选一。属于两个值的情况。 - vertical
-
stretch,repeat,round,space选一。属于两个值的情况。 stretch-
拉伸图片以填充边框。
repeat-
平铺图片以填充边框。
round-
平铺图像。当不能整数次平铺时,根据情况放大或缩小图像。
space-
平铺图像。当不能整数次平铺时,会用空白间隙填充在图像周围(不会放大或缩小图像)
inherit-
继承父级元素的计算值。
Examples
不同的取值,查看 border-image 的示例。
Specifications
| Specification |
|---|
| CSS Backgrounds and Borders Module Level 3 # the-border-image-repeat |
Browser compatibility
BCD tables only load in the browser