scriptlevel
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Das scriptlevel globale Attribut legt die math-depth eines MathML-Elements fest. Es ermöglicht das Überschreiben von Regeln aus dem User-Agent-Stylesheet, die eine automatische Berechnung der font-size innerhalb von MathML-Formeln definieren.
Syntax
<math scriptlevel="-1"> <!-- decrease math-depth by 1 --> <math scriptlevel="+2"> <!-- increase math-depth by 2 --> <math scriptlevel="0"> <!-- reset math-depth to 0 --> Werte
Wenn <U> eine positive Ganzzahl ist (d.h. das Vorzeichen wurde entfernt), sind die akzeptierten Werte:
<U>-
Setzt die
math-depthauf den Wert<U>. Dies stellt sicher, dass diefont-sizedes Elements denselben Wert hat wie die von Elementen in der angegebenen Tiefe. +<U>-
Setzt die
math-depthauf den Wertadd(<U>). Dies verkleinert diefont-sizedes Elements<U>Mal. -<U>-
Setzt die
math-depthauf den Wertadd(-<U>). Dies vergrößert diefont-sizedes Elements<U>Mal.
Beispiel
<!-- math-depth defaults to 0 on the <math> root. --> <math> <msubsup> <!-- math-depth and font-size remain unchanged on the base. --> <mtext>base</mtext> <!-- math-depth defaults to add(1) within the subscript, so it is incremented by 1 and the font-size is scaled down once. --> <mtext>subscript</mtext> <!-- math-depth defaults to add(1) within the superscript too, but the scriptlevel attribute tells to increment it by 2 instead, so the font-size is actually scaled down twice. --> <mtext scriptlevel="+2">superscript</mtext> </msubsup> </math> Spezifikationen
| Specification |
|---|
| MathML Core> # dfn-scriptlevel> |
Browser-Kompatibilität
Siehe auch
- Alle globalen Attribute.
- Das displaystyle globale Attribut.
font-sizemath-depthmath-style