目录

CSS text-emphasis 属性


示例

使用文本强调属性:

p.ex1 {
  text-emphasis: filled;
}

p.ex2 {
  text-emphasis: open;
}

p.ex3 {
  text-emphasis: double-circle red;
}

p.ex4 {
  text-emphasis: triangle blue;
}
亲自试一试 »

定义和用法

这个text-emphasis属性用于将强调标记应用于文本。

这个text-emphasis属性是text-emphasis-styletext-emphasis-color

提示:强调标记的大小约为字体大小的50%。

默认值: 无当前颜色
遗传: 是的
版本: CSS3
JavaScript 语法: 对象.style.textEmphasis="filled blue"

浏览器支持

表中的数字指定完全支持该属性的第一个浏览器版本。

Property
text-emphasis 99.0 99.0 46.0 7.0 85.0


CSS 语法

text-emphasis: none|filled|open|dot|circle|double-circle|triangle|sesame| string| color|initial|inherit;

Value Description
none No emphasis marks are applied Demo ❯
filled The emphasis marks are filled with a solid color Demo ❯
open The emphasis marks are hollow Demo ❯
dot The emphasis marks are small circles Demo ❯
circle The emphasis marks are circles Demo ❯
double-circle The emphasis marks are double circles Demo ❯
triangle The emphasis marks are triangles Demo ❯
sesame The emphasis marks are sesames Demo ❯
string The emphasis marks are the given string (one character) Demo ❯
color Sets the color of the emphasis marks Demo ❯
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit