指定如何重复边框图片:
#borderimg {
border-image-source: url(border.png);
border-image-repeat: repeat;
}
亲自试一试 »
这个border-image-repeat
属性指定边框图片是否应该重复、圆角、间隔或拉伸。
提示:另请参阅边框图片property(用于设置所有 border-image-* 属性的简写属性)。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
border-image-repeat | 15.0 | 11.0 | 15.0 | 6.0 | 15.0 |
border-image-repeat: stretch|repeat|round|space|initial|inherit;
笔记:此属性指定如何缩放和平铺边框图片的侧面和中间部分的图片。因此,您可以在此处指定两个值。如果省略第二个值,则假定它与第一个值相同。
Value | Description | Play it |
---|---|---|
stretch | Default value. The image is stretched to fill the area | Demo ❯ |
repeat | The image is tiled (repeated) to fill the area | Demo ❯ |
round | The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so it fits | Demo ❯ |
space | The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
CSS教程:CSS 边框图片
CSS 参考:边框图片属性
CSS 参考:border-image-outset 属性
CSS 参考:边框图片切片属性
CSS 参考:边框图片源属性
CSS 参考:边框图片宽度属性
HTML DOM 参考:borderImageRepeat 属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!