math-style
Baseline 2023Newly available
Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Please take two minutes to fill out our short survey.
Die Eigenschaft math-style
gibt an, ob MathML-Gleichungen mit normaler oder kompakter Höhe dargestellt werden sollen.
Syntax
css
/* Keyword values */
math-style: normal;
math-style: compact;
/* Global values */
math-style: inherit;
math-style: initial;
math-style: revert;
math-style: revert-layer;
math-style: unset;
Werte
Formale Definition
Anfangswert | normal |
---|---|
Anwendbar auf | alle Elemente |
Vererbt | Ja |
Berechneter Wert | wie angegeben |
Animationstyp | Not animatable |
Formale Syntax
math-style =
normal |
compact
Beispiele
Ändern des Stils einer Formel zu kompakt
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>
Ergebnis
Spezifikationen
Specification |
---|
MathML Core # the-math-style-property |