MathML教程

MathML msup

<msup> 标签用于为表达式绘制上标。

语法

这是使用此标签的简单语法-
<msup> base superscript </msup>

参数

这里是这个标签的所有参数的描述-
base-绘制上标的基础表达式。 msup-上标。

属性

这里是这个标签的所有属性的描述-
superscriptshift-指定将上标移动到表达式基线上方的最小空间。 class、id、style-与样式表一起使用。 href-指定指向指定 uri 的超链接。 mathbackground-指定背景颜色。有效格式为#rgb、#rrggbb 和 html 颜色名称。 mathcolor-指定文本颜色。有效格式为#rgb、#rrggbb 和 html 颜色名称。

示例

让我们画一个上标。
<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <msup>  
      <mi>x</mi>  
      <mn>1</mn>  
   </msup>
</math> 

输出

x 1

分组子表达式

使用 mrow 在上标中添加子表达式。
<math xmlns = "http://www.w3.org/1998/Math/MathML">
   <msup>  
      <mi>e</mi>  
      <mrow>  
         <mn>2</mn>  
         <mi>x</mi>  
         <mo>+</mo>  
         <mn>1</mn>  
      </mrow>   
   </msup>
</math>   

输出

e 2 x + 1
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4