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