math-style
Baseline
Large disponibilité
Cette fonctionnalité est bien établie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis août 2023.
La propriété CSS math-style indique si les équations MathML devraient être affichées en hauteur normale ou compacte.
Syntaxe
css
/* Valeurs avec un mot-clé */
math-style: normal;
math-style: compact;
/* Valeurs globales */
math-style: inherit;
math-style: initial;
math-style: revert;
math-style: revert-layer;
math-style: unset;
Valeurs
Définition formelle
| Valeur initiale | normal |
|---|---|
| Applicabilité | tous les éléments |
| Héritée | oui |
| Valeur calculée | comme défini |
| Type d'animation | Non animable |
Syntaxe formelle
math-style =
normal |
compact
Exemples
>Changer le style d'une formule en compact
CSS
css
math {
math-style: normal;
}
.compact {
math-style: compact;
}
HTML
html
<p>
Hauteur normale
<math>
<mrow>
<munderover>
<mo>∑</mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>+</mo>
<mn>∞</mn>
</mrow>
</munderover>
</mrow>
</math>
et hauteur compacte
<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>
des équations.
</p>
Résultat
Spécifications
| Spécification |
|---|
| MathML Core> # the-math-style-property> |
Compatibilité des navigateurs
Voir aussi
- La propriété
math-depth - La propriété
font-size