Văn bản kiểu dángDecorationColor thuộc tính
Thí 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";
Định nghĩa và Cách sử dụng
Thuộc tính textDecorationColor chỉ định màu của trang trí văn bản (gạch dưới, gạch ngang, gạch ngang).
Lưu ý: Thuộc tính textDecorationColor sẽ chỉ có hiệu lực trên 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 6.0 Moz |
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: | hiện tại |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho thuộc tính văn bản-trang trí-màu của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính text-decoration-color
❮ Đối tượng phong cách