使用 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
属性指定强调标记的位置(上、下、左、右)。
提示:使用 writing-mode
属性指定水平或垂直书写模式。
默认值: | 在右边 |
---|---|
遗传: | 是的 |
版本: | CSS3 |
JavaScript 语法: | 对象.style.textEmphasisPosition="under" |
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
text-emphasis-position | 99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
text-emphasis-position: over|under|left|right|initial|inherit;
Value | Description | |
---|---|---|
over | The emphasis marks are applied over the text (in horizontal writing mode) | Demo ❯ |
under | The emphasis marks are applied under the text (in horizontal writing mode) | Demo ❯ |
left | The emphasis marks are applied to the left of the text (in vertical writing mode) | |
right | The emphasis marks are applied to the right of the text (in vertical writing mode) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!