Latar belakang gayaKlip Properti
Contoh
Tentukan area lukisan latar belakang:
document.getElementById("myDIV").style.backgroundClip = "content-box";
Definisi dan Penggunaan
Properti backgroundClip menyetel atau mengembalikan area lukisan latar belakang.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
backgroundClip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
Sintaksis
Kembalikan properti backgroundClip:
object.style.backgroundClip
Setel properti backgroundClip:
object.style.backgroundClip = "border-box|padding-box|content-box|initial|inherit"
Nilai properti
Value | Description |
---|---|
border-box | Default value. The background is clipped to the border box |
padding-box | The background is clipped to the padding box |
content-box | The background is clipped to the content box |
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: | kotak perbatasan |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti background-clip dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti klip latar belakang