Style borderImageSource 屬性
實例
使用圖像作為環繞 div 元素的邊框:
document.getElementById("myDIV").style.borderImageSource="url(border.png)";
定義和用法
borderImageSource 屬性設置或返回要使用的圖像,而不是使用 border-style 屬性給定的邊框樣式。
提示:如果值為 "none",或者如果圖像不顯示,則使用邊框樣式。
流覽器支持
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 屬性