HTML DOM Style borderImageSource 屬性

2018-08-04 20:40 更新

Style borderImageSource 屬性

Style 對象參考手冊 Style 對象

實(shí)例

使用圖像作為環(huán)繞 div 元素的邊框:

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

嘗試一下 ?

定義和用法

borderImageSource 屬性設(shè)置或返回要使用的圖像,而不是使用 border-style 屬性給定的邊框樣式。

提示:如果值為 "none",或者如果圖像不顯示,則使用邊框樣式。


瀏覽器支持

Internet Explorer Firefox Opera Google Chrome Safari

Opera 不支持 borderImageSource 屬性。

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

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

請參閱 borderImage 屬性來替代它!


語法

返回 borderImageSource 屬性:

object.style.borderImageSource

設(shè)置 borderImageSource 屬性:

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

屬性值

描述
none 不使用圖像。
image 要用于繪制邊框的圖像的路徑。
initial 設(shè)置該屬性為它的默認(rèn)值。請參閱 initial
inherit 從父元素繼承該屬性。請參閱 inherit

技術(shù)細(xì)節(jié)

默認(rèn)值: none
返回值: 字符串,表示元素的 border-image-source 屬性。
CSS 版本 CSS3


相關(guān)文章

CSS 參考手冊:border-image-source 屬性


Style 對象參考手冊 Style 對象

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號