CSS text-emphasis-position 屬性
定義和用法
text-emphasis-position
屬性指定強調標記的位置(上、下、左、右)。
提示:使用 writing-mode 屬性來指定水平或垂直書寫模式。
實例
使用 text-emphasis-position
屬性:
h3.ex1 { text-emphasis: double-circle red; text-emphasis-position: over; } h3.ex2 { text-emphasis: triangle blue; text-emphasis-position: under; } h3.ex3 { writing-mode: vertical-rl; text-emphasis: triangle blue; text-emphasis-position: under right; } h3.ex4 { writing-mode: vertical-rl; text-emphasis: triangle blue; text-emphasis-position: under left; }
CSS 語法
text-emphasis-position: over|under|left|right|initial|inherit;
屬性值
值 | 描述 |
---|---|
over | 在文本上方應用強調標記(在水平書寫模式下)。 |
under | 在文本下方應用強調標記(在水平書寫模式下)。 |
left | 在文本左側應用強調標記(在垂直書寫模式下)。 |
right | 在文本右側應用強調標記(在垂直書寫模式下)。 |
initial | 將此屬性設置為其默認值。參閱 initial。 |
inherit | 從其父元素繼承此屬性。參閱 inherit。 |
技術細節
默認值: | over right |
---|---|
繼承性: | yes |
版本: | CSS3 |
JavaScript 語法: | object.style.textEmphasisPosition="under" |
瀏覽器支持
表格中的數字表示首個完全支持該屬性的瀏覽器版本。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
99.0 | 99.0 | 46.0 | 7.0 | 85.0 |