<mtd>
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.
* Some parts of this feature may have varying levels of support.
属性
该元素的属性包括全局 MathML 属性,以及以下属性:
columnspan
-
一个非负整数值,表示单元格横跨的列数。
rowspan
-
一个非负整数值,表示单元格横跨的行数。
某些浏览器还可能支持以下属性:
columnalign
非标准-
指定此单元格的水平对齐方式,并覆盖由
<mtable>
或<mtr>
指定的值。 可能的值包括:left
、center
和right
。 rowalign
非标准-
指定此单元格的垂直对齐方式,并覆盖由
<mtable>
或<mtr>
指定的值。 可能的值包括:axis
、baseline
、bottom
、center
和top
。
示例
使用 mtable、mrow、mtr 和 mtd 创建矩阵
html
<math display="block">
<mfrac>
<mi>A</mi>
<mn>2</mn>
</mfrac>
<mo>=</mo>
<mrow>
<mo>(</mo>
<mtable>
<mtr>
<mtd><mn>1</mn></mtd>
<mtd><mn>2</mn></mtd>
<mtd><mn>3</mn></mtd>
</mtr>
<mtr>
<mtd><mn>4</mn></mtd>
<mtd><mn>5</mn></mtd>
<mtd><mn>6</mn></mtd>
</mtr>
<mtr>
<mtd><mn>7</mn></mtd>
<mtd><mn>8</mn></mtd>
<mtd><mn>9</mn></mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</math>
规范
Specification |
---|
MathML Core # entry-in-table-or-matrix-mtd |
浏览器兼容性
BCD tables only load in the browser