<mrow>
Baseline 2023Newly available
Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Please help us by answering a few questions.
<mrow>
MathML 元素用于对子表达式进行分组,子表达式通常包含一个或多个运算符及其操作数(比如 <mi>
和 <mn>
)。此元素呈现为包含其内容的水平行。
在编写 MathML 表达式时,你应该按照表达式的数学解释中所使用的分组方式,使用 <mrow>
对表达式中的元素进行分组。正确的分组有助于表达式的呈现,具体体现在以下几个方面:
- 可以通过改变间距和阻止换行来改善显示效果。
- 通过自动化系统,如计算机代数系统和音频渲染器,它能简化表达式的解释(interpretation)过程。
属性
该元素接受全局 MathML 属性。
示例
html
<math display="block">
<mfrac>
<mrow>
<!-- 分子内容以一个 mrow 分组 -->
<mn>1</mn>
<mo>+</mo>
<mi>K</mi>
</mrow>
<mrow>
<!-- 分母内容以一个 mrow 分组 -->
<mn>3</mn>
<mrow>
<!-- 用一个 mrow 分组的带括号的表达式 -->
<mo>(</mo>
<mrow>
<!-- 括号内的内容以一个 mrow 分组 -->
<mi>x</mi>
<mo>+</mo>
<mi>y</mi>
</mrow>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
</math>
规范
Specification |
---|
MathML Core # horizontally-group-sub-expressions-mrow |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
mrow |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
参见
- HTML 分组元素:
<div>