Thuộc tính kiểu nhấn mạnh văn bản CSS
Ví dụ
Sử dụng thuộc tính kiểu nhấn mạnh văn bản:
p.ex1 {
text-emphasis-style: filled;
}
p.ex2 {
text-emphasis-style: open;
}
p.ex3 {
text-emphasis-style:
double-circle;
}
p.ex4 {
text-emphasis-style: "#";
}
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính text-emphasis-style
thiết lập kiểu của dấu nhấn mạnh.
Mẹo: Kích thước của dấu nhấn bằng khoảng 50% kích thước của phông chữ.
Giá trị mặc định: | không có |
---|---|
Thừa hưởng: | Đúng |
Phiên bản: | CSS3 |
Cú pháp JavaScript: | đối tượng .style.textEmphasisStyle="tam giác" |
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-style | 99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
Cú pháp CSS
text-emphasis-style:
none|filled|open|dot|circle|double-circle|triangle|sesame| string | color |initial|inherit;
Value | Description | |
---|---|---|
none | No emphasis marks are applied | Demo ❯ |
filled | The emphasis marks are filled with a solid color | Demo ❯ |
open | The emphasis marks are hollow | Demo ❯ |
dot | The emphasis marks are small circles | Demo ❯ |
circle | The emphasis marks are circles | Demo ❯ |
double-circle | The emphasis marks are double circles | Demo ❯ |
triangle | The emphasis marks are triangles | Demo ❯ |
sesame | The emphasis marks are sesames | Demo ❯ |
string | The emphasis marks are the given string (one character) | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |