试一试
text-emphasis-style: none;
text-emphasis-style: triangle;
text-emphasis-style: "x";
text-emphasis-style: filled double-circle;
<section id="default-example">
<p>
I'd far rather be
<span class="transition-all" id="example-element">happy than right</span>
any day.
</p>
</section>
p {
font: 1.5em sans-serif;
}
语法
css
/* Initial value */
text-emphasis-style: none; /* No emphasis marks */
/* <string> values */
text-emphasis-style: "x";
text-emphasis-style: "\25B2";
text-emphasis-style: "*";
/* 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: revert;
text-emphasis-style: revert-layer;
text-emphasis-style: unset;
值
none-
无着重号。
filled(实心)-
形状以实心颜色填充。如果
filled和open都没有出现,则这是默认值。 open-
形状是空心的。
dot(点)-
显示小圆点作为标记。实心点是
'•'(U+2022),空心点是'◦'(U+25E6)。 circle-
显示大圆圈作为标记。实心圆是
'●'(U+25CF),空心圆是'○'(U+25CB)。 double-circle(双圆)-
显示双圆作为标记。实心双圆是
'◉'(U+25C9),空心双圆是'◎'(U+25CE)。 triangle-
显示三角形作为标记。实心三角形是
'▲'(U+25B2),空心三角形是'△'(U+25B3)。 sesame(芝麻)-
显示芝麻点作为标记。实心芝麻是
'﹅'(U+FE45),空心芝麻是'﹆'(U+FE46)。 <string>-
显示给定的字符串作为标记。作者不应在
<string>中指定多个“字符”。用户代理可能会截断或忽略由多个字素簇组成的字符串。
正式定义
正式语法
text-emphasis-style =
none |
[ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] |
<string>
示例
基本示例
css
h2 {
-webkit-text-emphasis-style: sesame;
text-emphasis-style: sesame;
}
规范
| 规范 |
|---|
| CSS 文本装饰模块级别 3 # text-emphasis-style 属性 |
浏览器兼容性
加载中…
另见
- 相关属性
text-emphasis-color,text-emphasis。 text-emphasis-position属性允许定义着重号的位置。