displaystyle

displaystyle 全局属性是一个用于设置 MathML 元素的 math-style 的布尔值。

示例

在这个示例中,使用 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>

true

将显示样式设置为 normal

false

将显示样式设置为 compact

规范

Specification
MathML Core
# dfn-displaystyle

浏览器兼容性

BCD tables only load in the browser

参见