สไตล์ ข้อความการ ตกแต่งคุณสมบัติ สี
ตัวอย่าง
เปลี่ยนสีของเส้นในข้อความที่ขีดเส้นใต้:
document.getElementById("demo").style.textDecorationColor = "red";
ความหมายและการใช้งาน
คุณสมบัติ textDecorationColor ระบุสีของการตกแต่งข้อความ (ขีดเส้นใต้ ขีดทับ เส้นผ่าน)
หมายเหตุ:คุณสมบัติ textDecorationColor จะมีผลกับองค์ประกอบที่มีการตกแต่งข้อความที่มองเห็นได้เท่านั้น
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 6.0 Moz |
7.1 Webkit | 44.0 |
ไวยากรณ์
ส่งคืนคุณสมบัติ textDecorationColor:
object.style.textDecorationColor
ตั้งค่าคุณสมบัติ textDecorationColor:
object.style.textDecorationColor = "color|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
color | Specifies the color of the text-decoration |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | ปัจจุบันสี |
---|---|
คืนมูลค่า: | สตริงที่แสดงถึงคุณสมบัติ text-decoration-color ของ element |
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติ text-decoration-color
❮ สไตล์วัตถุ