mathsize
已弃用: 不再推荐使用该特性。虽然一些浏览器仍然支持它,但也许已从相关的 web 标准中移除,也许正准备移除或出于兼容性而保留。请尽量不要使用该特性,并更新现有的代码;参见本页面底部的兼容性表格以指导你作出决定。请注意,该特性随时可能无法正常工作。
mathsize
全局属性设置 MathML 元素的字体大小。
备注:
尽可能使用 CSS 对 MathML 进行样式设置。mathsize
属性只应包含在不支持 CSS 的应用程序中,并且如果设置的话,其将被 CSS font-size
属性值覆盖。
语法
html
<!-- <length> 值 -->
<math mathsize="12px">
<math mathsize="0.8em">
<!-- <percentage> 值 -->
<math mathsize="80%">
值
<length>
-
一个正的
<length>
值。对于大多数与字体相关的单位(例如em
和ex
),字体大小是相对于父元素的字体大小的。 <percentage>
-
一个正的
<percentage>
值,相对于父元素的字体大小。
备注: 一些浏览器可能还接受旧版 MathML 长度。
规范
Specification |
---|
MathML Core # dfn-mathsize |
-
在 MathML 3 和更早版本中,支持关键字
small
、normal
和big
,以及 MathML3 特定的长度语法。自 MathML 核心版本以来,语法与 CSS<length-percentage>
值相匹配。 -
此属性设计用于不支持 CSS 的 MathML 应用程序。自 MathML 核心版本以来,推荐使用等效的 CSS。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
mathsize | ||||||||||||
Named spaces (e.g. thinmathspace to mean 3/18em) | ||||||||||||
Nonzero unitless values (e.g. 5 to mean 500%) | ||||||||||||
small , normal , big values |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
- See implementation notes.
- Has more compatibility info.
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.