CSS text-emphasis 属性
- 前のページ text-decoration-thickness
- 次のページ text-emphasis-color
定義と使用法
text-emphasis
属性はテキストに強調マークを追加するために使用されます。
text-emphasis
属性は text-emphasis-style および text-emphasis-color の省略形。
ヒント:強調マークのサイズは、フォントサイズの約50%です。
例
使用 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; }
CSS文法
text-emphasis: none|filled|open|dot|circle|double-circle|triangle|sesame|string|color|initial|inherit;
属性値
値 | 説明 |
---|---|
none | 強調マークは適用されません。 |
filled | 強調マークは実心色で塗りつぶされます。 |
open | 強調マークは空心的です。 |
dot | 強調マークは小さな点です。 |
circle | 強調マークは円です。 |
double-circle | 強調マークは二重円です。 |
triangle | 強調マークは三角形です。 |
sesame | 強調マークは胡麻形(小さな点群)です。 |
string | 強調マークは指定された文字(1文字)です。 |
color | 強調マークの色を設定します。 |
initial | この属性をデフォルト値に設定します。参照: initial。 |
inherit | この属性は親要素から継承されます。参照: inherit。 |
技術的詳細
デフォルト値: | none currentcolor |
---|---|
継承性: | yes |
バージョン: | CSS3 |
JavaScript文法: | object.style.textEmphasis="filled blue" |
ブラウザのサポート
テーブルの数字は、その属性を完全にサポートする最初のブラウザのバージョンを示しています。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
- 前のページ text-decoration-thickness
- 次のページ text-emphasis-color