math-shift
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
math-shift プロパティは MathML 数式の中の上付き文字を通常のシフトとコンパクトシフトのどちらで上げるべきかを示します。
構文
css
/* キーワード値 */ math-shift: normal; math-shift: compact; /* グローバル値 */ math-shift: inherit; math-shift: initial; math-shift: revert; math-shift: revert-layer; math-shift: unset; 値
normal-
初期値で、通常のレンダリングを示します。 MathML 数式の上付き文字は OpenType MATH テーブルの superscriptShiftUp 引数を用います。
compact-
コンパクトなレンダリングを示します。 MathML 数式の中の上付き文字は OpenType MATH テーブルの superscriptShiftUpCramped 引数を使い、一般的に小さくなります。
公式定義
| 初期値 | normal |
|---|---|
| 適用対象 | すべての要素 |
| 継承 | あり |
| 計算値 | 指定通り |
| アニメーションの種類 | アニメーション不可 |
形式文法
math-shift =
normal |
compact
例
>CSS
css
math { math-shift: compact; } MathML
次の MathML は OpenType MATH テーブルを持つフォントを使って "x の 2 乗" の 2 つのバージョンを表示しています。 math-shift プロパティを実装しているブラウザーは、上付き文字を少し異なるシフトを使って上げることになります。
html
<math style="font-size: 64pt;"> <msup style="math-shift: normal"> <mi>x</mi> <mn>2</mn> </msup> <msup style="math-shift: compact"> <mi>x</mi> <mn>2</mn> </msup> </math> 仕様書
| Specification |
|---|
| MathML Core> # the-math-shift> |