Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. MathML
  3. 参考
  4. 全局属性
  5. displaystyle

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

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 的布尔值。

示例

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

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp