CSS text-emphasis-position 屬性
示例
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;
}
自己動手試一試 »
定義和用法
text-emphasis-position
屬性指定了強調標記的位置(over, under, left, right)。
提示:使用 writing-mode
屬性來指定水平或垂直書寫模式。
預設值 | over right |
---|---|
繼承 | 是 |
版本 | CSS3 |
JavaScript 語法 | object.style.textEmphasisPosition="under" |
瀏覽器支援
表中的數字指定了完全支援該屬性的第一個瀏覽器版本。
屬性 | |||||
---|---|---|---|---|---|
text-emphasis-position | 99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
CSS 語法
text-emphasis-position: over|under|left|right|initial|inherit;
值 | 描述 | |
---|---|---|
over | 強調標記應用於文字的上方(在水平書寫模式下) | 演示 ❯ |
under | 強調標記應用於文字的下方(在水平書寫模式下) | 演示 ❯ |
left | 強調標記應用於文字的左側(在垂直書寫模式下) | |
right | 強調標記應用於文字的右側(在垂直書寫模式下) | |
initial | 將此屬性設定為其預設值。閱讀關於initial | |
inherit | 從其父元素繼承此屬性。閱讀關於inherit |