當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


HTML5 MathML scriptsizemultiplier屬性用法及代碼示例

HTML5中的MathML scriptsizemultiplier屬性用於指定因腳本級別的更改而用於調整字體大小的乘數。此屬性的默認值為0.71。此屬性僅由<mstyle>標記接受。

用法:

<element scriptsizemultiplier="number">

屬性值:該屬性具有上述和以下描述的單個值:

  • number:此值用於指定因腳本級別的更改而用於調整字體大小的乘數。

下麵的示例說明了MathML scriptsizemultiplier屬性:

例:



HTML

<!DOCTYPE html> 
<html> 
  
<body> 
    <center> 
        <h1 style="color:green"> 
            GeeksforGeeks 
        </h1> 
  
        <h3> 
            HTML5 MathML scriptsizemultiplier 
            Attribute 
        </h3> 
          
        <math> 
            <mstyle displaystyle="true"
                mathcolor="purple" scriptlevel="0" 
                scriptsizemultiplier="2"> 
                  
                <mrow> 
                    <msubsup> 
                        <mo>∑</mo> 
                        <mn> i=1 </mn> 
                        <mn> n </mn> 
                    </msubsup> 
                    <mo>+</mo> 
                    <msub> 
                        <mi>x</mi> 
                        <mn>i</mn> 
                    </msub> 
                    <mo>=</mo> 
                    <mn>?</mn> 
                </mrow> 
            </mstyle> 
        </math> 
    </center> 
</body> 
  
</html>

輸出:

支持的瀏覽器:下麵列出了HTML5 MathML scriptsizemultiplier屬性支持的瀏覽器:

  • Firefox




相關用法


注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 HTML5 MathML scriptsizemultiplier Attribute。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。