此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
displaystyle
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月.
displaystyle全局属性是一个用于设置 MathML 元素的math-style 的布尔值。
In this article
示例
在这个示例中,使用munder 元素将脚本“A”附加到基础的“∑”上。默认情况下,求和符号是以从其父元素继承的字体大小渲染的,并且 A 作为缩小的下标。通过显式设置displaystyle="true" 属性,求和符号将会变大,并且“A”变成一个下标。
html
<math> <munder> <mo>∑</mo> <mi>A</mi> </munder> <munder displaystyle="true"> <mo>∑</mo> <mi>A</mi> </munder></math>语法
html
<math displaystyle="true"></math><math displaystyle="false"></math>值
规范
| Specification |
|---|
| MathML Core> # dfn-displaystyle> |