Gaya borderImage Properti
Contoh
Tentukan gambar sebagai batas di sekitar elemen <div>:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
Definisi dan Penggunaan
Properti borderImage adalah properti singkatan untuk mengatur properti borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset dan borderImageRepeat .
Nilai yang dihilangkan diatur ke nilai defaultnya.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Angka yang diikuti oleh Webkit, Moz, atau O menentukan versi pertama yang berfungsi dengan awalan.
Property | |||||
---|---|---|---|---|---|
borderImage | 16.0 4.0 Webkit |
11.0 | 15.0 3.5 Moz |
6.0 3.1 Webkit |
15.0 11.0 O |
Sintaksis
Kembalikan properti borderImage:
object.style.borderImage
Setel properti borderImage:
object.style.borderImage = "source slice width outset repeat|initial|inherit"
Nilai properti
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 |
Detail Teknis
Nilai Bawaan: | tidak ada 100% 10 peregangan |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti border-image dari sebuah elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti gambar batas