MathML<msup>
元素用来为表达式加上标,语法如下:<msup> base subscript </msup>
。
属性
- class, id, style
- 用来供样式表使用。
- href
- 用来设置标签点击后跳转的链接。
- mathbackground
- 用来设置背景色,可以使用
#rgb
、#rrggbb
或者HTML颜色名。 - mathcolor
- 用来设置文字颜色,同样可以使用
#rgb
、#rrggbb
或者HTML颜色名。 - superscriptshift
- 用来设置上标相对于表达式的基线的最小距离,它是一个长度值。
例子
下述代码表示:
您的浏览器的渲染结果:
<math> <msup> <mi>X</mi> <mn>2</mn> </msup> </math>
规范
Specification | Status | Comment |
---|---|---|
MathML 3.0 msup |
Recommendation | Current specification |
MathML 2.0 msup |
Recommendation | Initial specification |
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 未实现 | 1.0 (1.7 or earlier) | 未实现 | 未实现 | 5.1 |
href |
未实现 | 7.0 (7.0) | 未实现 | 未实现 | 未实现 |
mathbackground |
未实现 | 4.0 (2.0) | 未实现 | 未实现 | 5.1 |
mathcolor |
未实现 | 4.0 (2.0) | 未实现 | 未实现 | 5.1 |
superscriptshift |
未实现 | 1.0 (1.7 or earlier) | 未实现 | 未实现 | 未实现 |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 未实现 | 未实现 | 1.0 (1.0) | 未实现 | 未实现 | 未实现 |
href |
未实现 | 未实现 | 7.0 (7.0) | 未实现 | 未实现 | 未实现 |
mathbackground |
未实现 | 未实现 | 4.0 (2.0) | 未实现 | 未实现 | 未实现 |
mathcolor |
未实现 | 未实现 | 4.0 (2.0) | 未实现 | 未实现 | 未实现 |
superscriptshift |
未实现 | 未实现 | 1.0 (1.0) | 未实现 | 未实现 | 未实现 |
Gecko说明
- 从 Gecko 26.0 (Firefox 26 / Thunderbird 26 / SeaMonkey 2.23 / Firefox OS 1.2) 开始,不再支持使用<none />作为子元素。并且渲染结果和
<msub>
and<mmultiscripts>
这些等价配置更加接近,同时修复了一个关于superscriptshift属性错误使用的问题(参阅 bug 827713).
相关链接
<msub>
(Subscript)<msubsup>
(Subscript-superscript pair)<mmultiscripts>
(Prescripts and tensor indices)