คุณสมบัติCSS border-left
ตัวอย่าง
กำหนดลักษณะของเส้นขอบด้านซ้ายสำหรับองค์ประกอบต่างๆ:
h1 {
border-left: 5px solid red;
}
h2 {
border-left: 4px dotted blue;
}
div {
border-left: double;
}
ความหมายและการใช้งาน
ทรัพย์สิน เป็นborder-left
ทรัพย์สินชวเลขสำหรับ (ตามลำดับต่อไปนี้):
- border-left-width
- border-left-style (จำเป็น)
- ขอบซ้ายสี
หากละเว้นสีขอบซ้าย สีที่ใช้จะเป็นสีของข้อความ
ค่าเริ่มต้น: | ปานกลางไม่มีสี |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ใช่ดูคุณสมบัติแต่ละรายการ อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS1 |
ไวยากรณ์ JavaScript: | วัตถุ .style.borderLeft="3px จุดสีน้ำเงิน" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
border-left | 1.0 | 4.0 | 1.0 | 3.5 | 1.0 |
ไวยากรณ์ CSS
border-left: border-width border-style border-color|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description |
---|---|
border-left-width | Optional. Specifies the width of the left border. Default value is "medium" |
border-left-style | Required. Specifies the style of the left border. Default value is "none" |
border-left-color | Optional. Specifies the color of the left border. Default value is the color of the text |
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
การอ้างอิง HTML DOM: borderLeft คุณสมบัติ