คุณสมบัติคลิปพื้นหลัง CSS
ตัวอย่าง
ระบุระยะที่พื้นหลังควรขยายภายในองค์ประกอบ:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
ความหมายและการใช้งาน
คุณสมบัติbackground-clip
กำหนดระยะพื้นหลัง (สีหรือภาพ) ควรขยายภายในองค์ประกอบ
ค่าเริ่มต้น: | ขอบกล่อง |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.backgroundClip="content-box" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
ไวยากรณ์ CSS
background-clip: border-box|padding-box|content-box|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
border-box | Default value. The background extends behind the border | |
padding-box | The background extends to the inside edge of the border | |
content-box | The background extends to the edge of 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: พื้นหลัง CSS
การอ้างอิง HTML DOM: คุณสมบัติ backgroundClip