<mo>
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2023年1月.
* Some parts of this feature may have varying levels of support.
<mo> MathML 元素表示广义上的运算符。除了严格数学意义上的运算符外,该元素还包括像括号、分隔符(如,逗号和分号)或“绝对值”符号这一类的“运算符”。
属性
除了全局 MathML 属性外,该元素接受以下属性(其默认值取决于运算符的形式和内容):
accent非标准fence-
一个
<boolean>,表示运算符是否是围栏(例如括号)。该属性没有视觉效果。 largeop-
一个
<boolean>,表示当math-style设置为normal时是否应该放大运算符。 lspace-
一个
<length-percentage>,表示运算符前的空间量。 maxsize-
一个
<length-percentage>,表示运算符在可拉伸时的最大大小。 minsize-
一个
<length-percentage>,表示运算符在可拉伸时的最小大小。 movablelimits-
一个
<boolean>,表示附加的下标和上标在math-style设置为compact时是否需要移动到上下角标的位置。 rspace-
一个
<length-percentage>,表示运算符后的空间量。 separator-
一个
<boolean>,表示运算符是否是一个分隔符(例如逗号)。该属性没有视觉效果。 stretchy-
一个
<boolean>,表示运算符是否拉伸到相邻元素的大小。 symmetric-
一个
<boolean>,表示拉伸运算符是否应该与虚拟的数学轴(中心分数线)垂直对称。
备注:
对于 lspace、maxsize、minsize 和 rspace 属性,一些浏览器可能还接受旧版 MathML 长度。
示例
<math display="block">
<mrow>
<mn>5</mn>
<mo>+</mo>
<mn>5</mn>
</mrow>
</math>
<math display="block">
<mrow>
<mo>[</mo> <!-- 默认 form 值:prefix -->
<mrow>
<mn>0</mn>
<mo>;</mo> <!-- 默认 form 值:infix -->
<mn>1</mn>
</mrow>
<mo>)</mo> <!-- 默认 form 值:postfix -->
</mrow>
</math>
规范
| Specification |
|---|
| MathML Core> # operator-fence-separator-or-accent-mo> |
浏览器兼容性
Loading…