スタイルborderImageプロパティ
例
<div>要素の周囲の境界線として画像を指定します。
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
定義と使用法
borderImageプロパティは、borderImageSource、borderImageSlice、borderImageWidth、borderImageOutset、borderImageRepeatプロパティを 設定する ための 省略形 の プロパティです。
省略された値はデフォルト値に設定されます。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Webkit、Moz、またはOが後に続く数字は、プレフィックスで機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
borderImage | 16.0 4.0 Webkit |
11.0 | 15.0 3.5 Moz |
6.0 3.1 Webkit |
15.0 11.0 O |
構文
borderImageプロパティを返します。
object.style.borderImage
borderImageプロパティを設定します。
object.style.borderImage = "source slice width outset repeat|initial|inherit"
プロパティ値
Value | Description |
---|---|
borderImageSource | The path to the image to be used as a border |
borderImageSlice | The inward offsets of the image-border |
borderImageWidth | The widths of the image-border |
borderImageOutset | The amount by which the border image area extends beyond the border box |
borderImageRepeat | Whether the image-border should be repeated, rounded or stretched |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | なし100%10ストレッチ |
---|---|
戻り値: | 要素のborder-imageプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:border-imageプロパティ