zoukankan      html  css  js  c++  java
  • HTML5

    HTML5 MathML

    MathML 简介

    • MathML 是数学标记语言,是一种基于 XML 的标准,用来在互联网上书写数学符号和公式的置标语言。
    • MathML 对应的 HTML 标签是 <math>...</math>

    MathML 实例

    <!DOCTYPE html>
    <html>
       <head>
          <meta charset="UTF-8">
          <title>MathML 实例1</title>
       </head>    
       <body> 
           <p>
               MathML 实现数学公式:a平方 + b平方 = c平方
           </p>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
             <mrow>
                <msup><mi>a</mi><mn>2</mn></msup>
                <mo>+</mo>
                    
                <msup><mi>b</mi><mn>2</mn></msup>
                <mo>=</mo>
                    
                <msup><mi>c</mi><mn>2</mn></msup>
             </mrow>     
          </math>  
       </body>
    </html>
    
    <!DOCTYPE html>
    <html>
       <head>
          <meta charset="UTF-8">
          <title>MathML 实例22</title>
       </head>
       <body>
           <p>
               MathML 实现一元二次方程
           </p>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
             <mrow>            
                <mrow>
                   <msup>
                      <mi>x</mi>
                      <mn>2</mn>
                   </msup>
                   <mo>+</mo>
                   <mrow>
                      <mn>4</mn>
                      <mo>⁢</mo>
                      <mi>x</mi>
                   </mrow>
                   <mo>+</mo>
                   <mn>4</mn>
                </mrow>
                <mo>=</mo>
                <mn>0</mn>
             </mrow>
          </math>
       </body>
    </html>
    
    <!DOCTYPE html>
    <html>
       <head>
          <meta charset="UTF-8">
          <title>MathML 实例3</title>
       </head>
       <body>
           <p>
               MathML 实现数学矩阵
           </p>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
             <mrow>
                <mi>A</mi>
                <mo>=</mo>
                <mfenced open="[" close="]">
                   <mtable>
                      <mtr>
                         <mtd><mi>x</mi></mtd>
                         <mtd><mi>y</mi></mtd>
                      </mtr>
                      <mtr>
                         <mtd><mi>z</mi></mtd>
                         <mtd><mi>w</mi></mtd>
                      </mtr>
                   </mtable>
                </mfenced>
             </mrow>
          </math>
       </body>
    </html>
    
  • 相关阅读:
    Oracle 备份脚本
    Centos 安装DBI和ORACLE DBD
    人生到此初相见——北漂18年(10)
    备份上个月的日志
    mysql 授权
    竹杖芒鞋轻胜马,一蓑烟雨任平生——写在38岁生日
    haproxy 跨域访问:
    redis 配置说明
    vsftpd 500 OOPS: bad bool value in config file for: anon_world_readable_only
    vsftpd 配置虚拟用户
  • 原文地址:https://www.cnblogs.com/xdy-/p/13467573.html
Copyright © 2011-2022 走看看