เส้นขอบ สไตล์RightStyle Property
ตัวอย่าง
เพิ่มเส้นขอบด้านขวา "ทึบ" ให้กับ <div> องค์ประกอบ:
document.getElementById("myDiv").style.borderRightStyle = "solid";
ความหมายและการใช้งาน
คุณสมบัติ borderRightStyle ตั้งค่าหรือส่งคืนลักษณะของเส้นขอบด้านขวาขององค์ประกอบ
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
borderRightStyle | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ borderRightStyle:
object.style.borderRightStyle
ตั้งค่าคุณสมบัติ borderRightStyle:
object.style.borderRightStyle = value
มูลค่าทรัพย์สิน
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
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> องค์ประกอบเป็น "dotted":
document.getElementById("myDiv").style.borderRightStyle = "dotted";
ตัวอย่าง
กลับรูปแบบเส้นขอบด้านขวาของ <div> องค์ประกอบ:
alert(document.getElementById("myDiv").style.borderRightStyle);
ตัวอย่าง
การสาธิตค่าต่างๆ ทั้งหมด:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderRightStyle = listValue;
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Border
การอ้างอิง CSS: คุณสมบัติ border-right-style
การอ้างอิง HTML DOM: คุณสมบัติเส้นขอบ
❮ สไตล์วัตถุ