เส้นขอบสไตล์คุณสมบัติ รูปภาพ
ตัวอย่าง
ระบุรูปภาพเป็นเส้นขอบรอบ <div> องค์ประกอบ:
document.getElementById("myDIV").style.borderImage = "url(border.png) 30 30 round";
ความหมายและการใช้งาน
คุณสมบัติ borderImage เป็นคุณสมบัติชวเลขสำหรับการตั้งค่าคุณสมบัติ borderImageSource , borderImageSlice , borderImageWidth , borderImageOutset และคุณสมบัติborderImageRepeat
ค่าที่ละเว้นจะถูกตั้งค่าเป็นค่าเริ่มต้น
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย 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% 1 0 ยืด |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติ border-image ขององค์ประกอบ |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: border-image คุณสมบัติ