目录

style borderImageRepeat 属性

示例

指定如何重复图片边框:

document.getElementById("myDIV").style.borderImageRepeat = "round";
亲自试一试 »

描述

borderImageRepeat 属性设置或返回图片边框是否应重复、圆角或拉伸。


浏览器支持

表中的数字指定完全支持该属性的第一个浏览器版本。

Property
borderImageRepeat Yes 11.0 Yes 6.0 15.0

看着那(这边框图片属性代替!


语法

返回 borderImageRepeat 属性:

object.style.borderImageRepeat

设置 borderImageRepeat 属性:

object.style.borderImageRepeat = "stretch|repeat|round|initial|inherit"

属性值

Value Description
stretch Default value. The image is stretched to fill the area
repeat The image is tiled (repeated) to fill the area
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
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
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

技术细节

默认值: 拉紧
返回值: 一个字符串,表示元素的 border-image-repeat 属性
CSS版本 CSS3

相关页面

CSS 参考:边框图片重复属性