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