คุณสมบัติCSS border-image-width
ตัวอย่าง
ระบุความกว้างของภาพเส้นขอบ:
#borderimg
{
border-image-source: url(border.png);
border-image-width: 10px;
}
ความหมายและการใช้งาน
คุณสมบัติระบุ ความborder-image-width
กว้างของรูปภาพเส้นขอบ
เคล็ดลับ:ดูคุณสมบัติborder-imageด้วย (คุณสมบัติชวเลขสำหรับการตั้งค่าคุณสมบัติ border-image-* ทั้งหมด)
ค่าเริ่มต้น: | 1 |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.borderImageWidth="20px" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
border-image-width | 15.0 | 11.0 | 13.0 | 6.0 | 15.0 |
ไวยากรณ์ CSS
border-image-width: number|%|auto|initial|inherit;
หมายเหตุ:คุณสมบัติborder-image-width
สามารถรับค่าได้ตั้งแต่หนึ่งถึงสี่ค่า (ด้านบน ด้านขวา ด้านล่าง และด้านซ้าย) หากละค่าที่สี่ ค่านั้นจะเป็นค่าเดียวกับค่าที่สอง หากละเว้นอันที่สามด้วย จะเป็นอันเดียวกับอันแรก หากละเว้นอันที่สองไปด้วย ก็จะเหมือนกับอันแรก
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
length | A length unit (px) specifying the size of the border-width | |
number | Default value 1. Represents multiples of the corresponding border-width | |
% | Refers to the size of the border image area: the width of the area for horizontal offsets, the height for vertical offsets | |
auto | If specified, the width is the intrinsic width or height of the corresponding image slice | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Border Images
การอ้างอิง CSS: คุณสมบัติ border-image
การอ้างอิง CSS: border-image-outset คุณสมบัติ
การอ้างอิง CSS: border-image-repeat คุณสมบัติ
การอ้างอิง CSS: border-image-slice คุณสมบัติ
การอ้างอิง CSS: border-image-source property
การอ้างอิง HTML DOM: borderImageWidth คุณสมบัติ