CSS text-emphasis-color 屬性
- 上一頁 text-emphasis
- 下一頁 text-emphasis-position
定義和用法
text-emphasis-color
屬性設置強調標記的顏色。
提示:除非設置了 text-emphasis-style 屬性,否則不會顯示強調標記。
實例
使用 text-emphasis-color 屬性:
p.ex1 { text-emphasis-color: red; } p.ex2 { text-emphasis-color: blue; } p.ex3 { text-emphasis-color: rgb(130, 180, 150); } p.ex4 { text-emphasis-color: currentcolor; }
CSS 語法
text-emphasis-color: color|inherit|initial;
屬性值
值 | 描述 |
---|---|
color |
設置強調標記的顏色。 如果未指定顏色,則使用 currentcolor。 |
initial | 將此屬性設置為其默認值。參閱 initial。 |
inherit | 從其父元素繼承此屬性。參閱 inherit。 |
技術細節
默認值: | currentcolor |
---|---|
繼承性: | yes |
版本: | CSS3 |
JavaScript 語法: | object.style.textEmphasisColor="blue" |
瀏覽器支持
表格中的數字表示首個完全支持該屬性的瀏覽器版本。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
- 上一頁 text-emphasis
- 下一頁 text-emphasis-position