text-emphasis-color
CSS の text-emphasis-color
プロパティは、圏点の色を設定します。この値は一括指定の text-emphasis
を使用して設定することもできます。
/* 初期値 */
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: unset;
初期値 | currentcolor |
---|---|
適用対象 | すべての要素 |
継承 | なし |
計算値 | 色の計算値 |
アニメーションの種類 | 色 |
構文
値
<color>
- 記号の色を定義します。 color が存在しない場合、既定で
currentColor
になります。
形式文法
<color>ここで
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>
ここで
<rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )
<rgba()> = rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )
<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )
<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )ここで
<alpha-value> = <number> | <percentage>
<hue> = <number> | <angle>
例
CSS
h3 {
text-emphasis-color: #555;
text-emphasis-style: "*";
}
HTML
<p>Here's an example:</p>
<h3>This has emphasis marks!</h3>
結果
仕様書
仕様書 | 状態 | 備考 |
---|---|---|
CSS Text Decoration Module Level 3 text-emphasis の定義 |
勧告候補 | 初回定義 |
ブラウザーの対応
BCD tables only load in the browser
このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 https://github.com/mdn/browser-compat-data をチェックアウトしてプルリクエストを送信してください。
関連情報
<color>
データ型- 他の強調記号に関するプロパティ:
text-emphasis-style
,text-emphasis
,text-emphasis-position
. - 色に関する他のプロパティ:
color
,background-color
,border-color
,outline-color
,text-emphasis-color
,text-shadow
,caret-color
,column-rule-color
- CSS を使用した HTML 要素への色の適用