text-emphasis-style
CSS
property sets the appearance of emphasis marks. It can also be set, and reset, using the
text-emphasis
shorthand.
/* Initial value */ text-emphasis-style: none; /* No emphasis marks */ /* <string> values */ text-emphasis-style: 'x'; text-emphasis-style: '点'; text-emphasis-style: '\25B2'; text-emphasis-style: '*'; text-emphasis-style: 'foo'; /* Should NOT be used. It may be computed to or rendered as 'f' only */ /* Keyword values */ text-emphasis-style: filled; text-emphasis-style: open; text-emphasis-style: dot; text-emphasis-style: circle; text-emphasis-style: double-circle; text-emphasis-style: triangle; text-emphasis-style: filled sesame; text-emphasis-style: open sesame; /* Global values */ text-emphasis-style: inherit; text-emphasis-style: initial; text-emphasis-style: unset;
none
No emphasis marks.
filled
filled
nor
open
is present, this is the default.
open
The shape is hollow.
dot
'•'
(
U+2022
), and the open dot is
'◦'
(
U+25E6
).
circle
'●'
(
U+25CF
), and the open circle is
'○'
(
U+25CB
).
double-circle
'◉'
(
U+25C9
), and the open double-circle is
'◎'
(
U+25CE
).
triangle
'▲'
(
U+25B2
), and the open triangle is
'△'
(
U+25B3
).
sesame
'﹅'
(
U+FE45
), and the open sesame is
'﹆'
(
U+FE46
).
<string>
<string>
. The UA may truncate or ignore strings consisting of more than one grapheme cluster.
| 初始值 |
none
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 计算值 | 如指定 |
| 动画类型 | discrete |
none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>
h2 {
text-emphasis-style: sesame;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Text Decoration Module Level 3
The definition of 'text-emphasis' in that specification. |
候选推荐 | 初始定义 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
text-emphasis-style
|
Chrome
完整支持
25
Prefixed
|
Edge
完整支持
79
Prefixed
|
Firefox
完整支持
46
|
IE 不支持 No |
Opera
完整支持
15
Prefixed
|
Safari 完整支持 6.1 |
WebView Android
完整支持
4.4
Prefixed
|
Chrome Android
完整支持
25
Prefixed
|
Firefox Android
完整支持
46
|
Opera Android
完整支持
14
Prefixed
|
Safari iOS 完整支持 7 |
Samsung Internet Android
完整支持
1.5
Prefixed
|
完整支持
不支持
用户必须明确启用此特征。
要求使用供应商前缀或不同名称。
text-emphasis-color
,
text-emphasis
.
text-emphasis-position
property allowing to define the position of the emphasis marks.