文本属性-风格 | text-emphasis-style
该text-emphasis-style
CSS属性定义强调标记所使用的类型。它也可以使用text-emphasis
简写属性来设置和重置。
/* Initial value */
text-emphasis-style: none; /* No emphasis marks */
/* value */
text-emphasis-style: 'x';
text-emphasis-style: '点';
text-emphasis-style: '\25B2';
text-emphasis-style: '*';
text-emphasis-style: 'foo'; /* Should NOT use. It may be computed to or rendered as 'f' only */
/* Keywords value */
text-emphasis-style: filled;
text-emphasis-style: open;
text-emphasis-style: filled sesame;
text-emphasis-style: open sesame;
/* Global values */
text-emphasis-style: inherit;
text-emphasis-style: initial;
text-emphasis-style: unset;
Initial value | none |
---|---|
Applies to | all elements |
Inherited | no |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
语法
可能值
none
——无强调标记。
filled
——形状中填充满纯色。如果既不存在filled
也不存在open
,这是默认的值。
open
——形状是空心的。
dot
——显示小圆圈作为标记。实心点是'•'
(U+2022
),空心点是'◦'
(U+25E6
)。
circle
——显示大圆圈作为标记。实心圆是'●'
(U+25CF
),空心圆是'○'
(U+25CB
)。这是在没有给出其他形状的情况下在水平方向的writing modes 下的默认形状。
double-circle
——显示双圈作为标记。实心的双圈为'◉'
(U+25C9
),空心的双圈为'◎'
(U+25CE
)。
triangle
——显示三角形作为标记。实心三角形是'▲'
(U+25B2
),空心三角形是'△'
(U+25B3
)。sesame
——显示芝麻形状作为标记。实心芝麻是'﹅'
(U+FE45
),空心芝麻是'﹆'
(U+FE46
)。这是在没有给出其他形状的情况下垂直方向的writing modes下的默认形状。
<string>
——显示给定的字符串作为标记。作者不应该在<string>
中指定一个以上的字符。UA可能会截断或忽略由多个字符组成的字符串。
形式语法
none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>
实例
h2 {
text-emphasis-style: sesame;
}
规范
Specification | Status | Comment |
---|---|---|
CSS Text Decoration Module Level 3The definition of 'text-emphasis' in that specification. | Candidate Recommendation | Initial definition |
浏览器兼容性
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 46 (46)1 | 25.0-webkit | No support | 15.0-webkit | 6.1-webkit 7.1 |
Feature | Firefox Mobile (Gecko) | Android | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 46 (46)1 | 4.4-webkit | No support | 33-webkit | 7.1 |
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com