สไตล์พื้นหลังคุณสมบัติคลิป
ตัวอย่าง
ระบุพื้นที่ภาพวาดของพื้นหลัง:
document.getElementById("myDIV").style.backgroundClip = "content-box";
ความหมายและการใช้งาน
คุณสมบัติ backgroundClip ตั้งค่าหรือส่งคืนพื้นที่ภาพวาดของพื้นหลัง
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
backgroundClip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
ไวยากรณ์
ส่งคืนคุณสมบัติ backgroundClip:
object.style.backgroundClip
ตั้งค่าคุณสมบัติ backgroundClip:
object.style.backgroundClip = "border-box|padding-box|content-box|initial|inherit"
มูลค่าทรัพย์สิน
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 |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | ขอบกล่อง |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติคลิปพื้นหลังขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติคลิปพื้นหลัง