borderimagesource

收藏:0   阅读:28

Style borderImageSource 属性

实例

使用图像作为环绕 div 元素的边框:

document.getElementById("myDIV").style.borderImageSource="url(border.png)";


定义和用法

borderImageSource 属性设置或返回要使用的图像,而不是使用 border-style 属性给定的边框样式。

提示:如果值为 "none",或者如果图像不显示,则使用边框样式。


浏览器支持

Internet Explorer Firefox Opera Google Chrome Safari

Opera 不支持 borderImageSource 属性。

Internet Explorer 10 及其之前的版本不支持 borderImageSource 属性。

Safari 5 及其之前的版本不支持 borderImageSource 属性。

请参阅 borderImage 属性来替代它!


语法

返回 borderImageSource 属性:

object.style.borderImageSource

设置 borderImageSource 属性:

object.style.borderImageSource="none|image|initial|inherit"

属性值

描述
none 不使用图像。
image 要用于绘制边框的图像的路径。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

技术细节

默认值: none
返回值: 字符串,表示元素的 border-image-source 属性。
CSS 版本 CSS3


相关文章

CSS 参考手册:border-image-source 属性

© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!