语法
html
<math scriptlevel="-1"> <!-- decrease math-depth by 1 -->
<math scriptlevel="+2"> <!-- increase math-depth by 2 -->
<math scriptlevel="0"> <!-- reset math-depth to 0 -->
值
如果 <U>
是一个无符号 整数(即,移除符号前缀),则接受的值为:
示例
html
<!-- 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>
规范
规范 |
---|
MathML Core # dfn-scriptlevel |
浏览器兼容性
加载中…
另见
- 所有 全局属性。
- displaystyle 全局属性。
font-size
math-depth
math-style