試一試
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屬性允許定義著重號的位置。