Kiểu văn bảnTrang tríThuộc tính màu
Ví dụ
Thay đổi màu của dòng trong văn bản được gạch chân:
document.getElementById("demo").style.textDecorationColor = "red";
Hãy tự mình thử »Sự miêu tả
Thuộc tính textDecorationColor chỉ định màu của phần trang trí văn bản (gạch chân, gạch chân, gạch ngang).
Lưu ý: Thuộc tính textDecorationColor sẽ chỉ có hiệu lực đối với các phần tử có trang trí văn bản hiển thị.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
textDecorationColor | 57 | 79.0 | 36.0 | 7.1 Webkit | 44.0 |
Cú pháp
Trả về thuộc tính textDecorationColor:
object .style.textDecorationColor
Đặt thuộc tính textDecorationColor:
object .style.textDecorationColor = "color |initial|inherit"
Giá trị tài sản
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 |
Chi tiết kỹ thuật
Giá trị mặc định: | màu hiện tại |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính màu văn bản trang trí của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham khảo CSS: thuộc tính màu văn bản trang trí