此属性指定将用作元素的边框的图像的路径。
可能的值
- none - 它表示没有图像将用作边框。
- image − 它表示要用作边框的图像的路径。
- initial − 它设置属性的默认值。
- inherit - 它从父元素继承属性。
适用于
所有 HTML 元素。
DOM 语法
object.style.borderImageSource = url('image');
例
以下示例显示了此属性的效果 -
<html>
<head>
<style>
.box {
width: 200px;
height: 200px;
border: 20px solid;
border-image-source: url(images/border.png);
border-image-slice: 33%;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>