Thuộc tính màu văn bản nhấn mạnh CSS
Ví dụ
Sử dụng thuộc tính text-emphasis-color:
p.ex1 {
text-emphasis-color: red;
}
p.ex2 {
text-emphasis-color: blue;
}
p.ex3 {
text-emphasis-color: rgb(130,
180, 150);
}
p.ex4 {
text-emphasis-color: currentcolor;
}
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính text-emphasis-color
thiết lập màu của dấu nhấn mạnh.
Mẹo: Không có dấu nhấn mạnh nào được hiển thị, trừ khi thuộc tính text-emphasis-style
được đặt.
Giá trị mặc định: | màu hiện tại |
---|---|
Thừa hưởng: | Đúng |
Phiên bản: | CSS3 |
Cú pháp JavaScript: | đối tượng .style.textEmphasisColor="blue" |
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Property | |||||
---|---|---|---|---|---|
text-emphasis-color | 99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
Cú pháp CSS
text-emphasis-color:
color |inherit|initial;
Value | Description | |
---|---|---|
color | Sets the color of the emphasis marks. If no color is specified, it uses the currentcolor | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |