スタイルborderImageSourceプロパティ
例
div要素の周囲の境界線として画像を使用します。
document.getElementById("myDIV").style.borderImageSource = "url(border.png)";
定義と使用法
borderImageSourceプロパティは、border-styleプロパティで指定された境界線スタイルの代わりに、使用する画像を設定または返します。
ヒント:値が「none」の場合、または画像を表示できない場合は、境界線のスタイルが使用されます。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
borderImageSource | Yes | 11.0 | Yes | 6.0 | 15.0 11.0 O |
代わりにborderImageプロパティを見てください!
構文
borderImageSourceプロパティを返します。
object.style.borderImageSource
borderImageSourceプロパティを設定します。
object.style.borderImageSource = "none|image|initial|inherit"
プロパティ値
Value | Description |
---|---|
none | No image will be used |
image | The path to the image to be used as a border |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | なし |
---|---|
戻り値: | 要素のborder-image-sourceプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:border-image-sourceプロパティ