<mspace>

Baseline 2023
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

<mspace> MathML 元素用来显示一段空白,空白的大小由它自身的属性设置。

属性

该元素的属性包括全局 MathML 属性以及下列属性:

depth

<length-percentage> 值,表示空白(在基线下方)的深度。

height

<length-percentage> 值,表示空白(在基线上方)的高度。

width

<length-percentage> 值,表示空白的宽度。

备注: 对于 depthheightwidth 属性,一些浏览器可能也接受旧版 MathML 长度值

示例

html
<math display="block">
  <mn>1</mn>
  <mspace depth="40px" height="20px" width="100px"
          style="background: lightblue;"/>
  <mn>2</mn>
</math>

规范

Specification
MathML Core
# space-mspace

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
mspace
depth
height
Named spaces (e.g. thinmathspace to mean 3/18em) for width, height and depth attributes
DeprecatedNon-standard
width

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.
See implementation notes.

参见