text-emphasis-color

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2022.

text-emphasis-colorCSS のプロパティで、圏点の色を設定します。この値は一括指定の text-emphasis を使用して設定することもできます。

試してみましょう

構文

css
/* 初期値 */
text-emphasis-color: currentcolor;

/* <color> */
text-emphasis-color: #555;
text-emphasis-color: blue;
text-emphasis-color: rgba(90, 200, 160, 0.8);
text-emphasis-color: transparent;

/* グローバル値 */
text-emphasis-color: inherit;
text-emphasis-color: initial;
text-emphasis-color: revert;
text-emphasis-color: revert-layer;
text-emphasis-color: unset;

<color>

記号の色を定義します。 color が存在しない場合、既定で currentcolor になります。

公式定義

初期値currentcolor
適用対象すべての要素
継承あり
計算値色の計算値
アニメーションの種類

形式文法

text-emphasis-color = 
<color>

色と固有の文字で強調

CSS

css
em {
  text-emphasis-color: green;
  text-emphasis-style: "*";
}

HTML

html
<p>例:</p>

<em>これには圏点があります!</em>

結果

仕様書

Specification
CSS Text Decoration Module Level 3
# text-emphasis-color-property

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
text-emphasis-color

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Requires a vendor prefix or different name for use.
Has more compatibility info.

関連情報