สไตล์borderBottomColorคุณสมบัติ
ตัวอย่าง
เปลี่ยนสีของขอบด้านล่างของ <div> องค์ประกอบเป็นสีแดง:
document.getElementById("myDiv").style.borderBottomColor = "red";
ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง
ความหมายและการใช้งาน
คุณสมบัติ borderBottomColor ตั้งค่าหรือคืนค่าสีของเส้นขอบด้านล่างขององค์ประกอบ
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
borderBottomColor | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
ไวยากรณ์
ส่งคืนคุณสมบัติ borderBottomColor:
object.style.borderBottomColor
ตั้งค่าคุณสมบัติ borderBottomColor:
object.style.borderBottomColor = "color|transparent|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
color | Specifies the color of the bottom border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the bottom border is transparent (underlying content will shine through) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | สีปัจจุบัน |
---|---|
คืนมูลค่า: | สตริงที่แสดงสีของเส้นขอบด้านล่างขององค์ประกอบ |
เวอร์ชัน CSS | CSS1 |
ตัวอย่างเพิ่มเติม
ตัวอย่าง
กลับสีขอบด้านล่างของ <div> องค์ประกอบ:
alert(document.getElementById("myDiv").style.borderBottomColor);
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Border
การอ้างอิง CSS: border-bottom-color คุณสมบัติ
การอ้างอิง HTML DOM: คุณสมบัติเส้นขอบ