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 erlaubt das Überschreiben von Regeln aus dem Benutzeragenten-Stylesheet, die eine automatische Berechnung der Schriftgröße 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 vorzeichenlose Ganzzahl ist (d.h. das Vorzeichen wurde entfernt), dann sind die akzeptierten Werte:
<U>
-
Setzt die
math-depth
auf den Wert<U>
. Dies setzt dieSchriftgröße
des Elements auf denselben Wert wie der von Elementen in der angegebenen Tiefe. +<U>
-
Setzt die
math-depth
auf den Wertadd(<U>)
. Dies verkleinert dieSchriftgröße
des Elements um das<U>
-Fache. -<U>
-
Setzt die
math-depth
auf den Wertadd(-<U>)
. Dies vergrößert dieSchriftgröße
des Elements um das<U>
-Fache.
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
Loading…
Siehe auch
- Alle globalen Attribute.
- Das globale Attribut displaystyle.
font-size
math-depth
math-style