math-style
Baseline 2023 Newly available
Since August 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
math-style プロパティは、 MathML の数式を通常の高さで表示するか、コンパクトな高さで表示するかを指定します。
構文
css
/* キーワード値 */ math-style: normal; math-style: compact; /* グローバル値 */ math-style: inherit; math-style: initial; math-style: revert; math-style: revert-layer; math-style: unset; 値
公式定義
| 初期値 | normal |
|---|---|
| 適用対象 | すべての要素 |
| 継承 | あり |
| 計算値 | 指定通り |
| アニメーションの種類 | アニメーション不可 |
形式文法
math-style =
normal |
compact
例
>数式のスタイルを compact に変更
CSS
css
math { math-style: normal; } .compact { math-style: compact; } HTML
html
<p> Normal height <math> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mo>+</mo> <mn>∞</mn> </mrow> </munderover> </mrow> </math> and compact height <math class="compact"> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mo>+</mo> <mn>∞</mn> </mrow> </munderover> </mrow> </math> equations. </p> 結果
仕様書
| Specification |
|---|
| MathML Core> # the-math-style-property> |