สไตล์เส้นขอบRightColorคุณสมบัติ
ตัวอย่าง
เปลี่ยนสีของขอบด้านขวาของ <div> องค์ประกอบเป็นสีแดง:
document.getElementById("myDiv").style.borderRightColor = "red";
ความหมายและการใช้งาน
คุณสมบัติ borderRightColor ตั้งค่าหรือคืนค่าสีของเส้นขอบด้านขวาขององค์ประกอบ
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
borderRightColor | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ borderRightColor:
object.style.borderRightColor
ตั้งค่าคุณสมบัติ borderRightColor:
object.style.borderRightColor = "color|transparent|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
color | Specifies the color of the right 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 right 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.borderRightColor);
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Border
การอ้างอิง CSS: คุณสมบัติ border-right-color
การอ้างอิง HTML DOM: คุณสมบัติเส้นขอบ
❮ สไตล์วัตถุ