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


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

HTML5中的MathML subscriptshift屬性用於定義將下標移動到表達式基線以下的最小數量。長度值可以使用任何CSS長度單位指定。 <mmultiscripts>,<msub>和<msubsup>標記接受此屬性。

用法:

<element subscriptshift="length">

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

  • length:此值保存下標將移動到基線以下的量。

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

例:



HTML

<!DOCTYPE html> 
<html> 
  
<body> 
    <center> 
        <h1 style="color:green"> 
            GeeksforGeeks 
        </h1> 
  
        <h3> 
            HTML5 MathML subscriptshift Attribute 
        </h3> 
          
        <math> 
            <mfenced> 
                <mrow> 
                    <msub> 
                        <mi>x</mi> 
                        <mn>2</mn> 
                    </msub> 
                    <mo>+</mo> 
                    <msub subscriptshift="15px"> 
                        <mi>y</mi> 
                        <mn>2</mn> 
                    </msub> 
                    <mo>=</mo> 
                    <msub subscriptshift="25px"> 
                        <mi>z</mi> 
                        <mn>2</mn> 
                    </msub> 
                </mrow> 
            </mfenced> 
        </math> 
    </center> 
</body> 
  
</html>

輸出:

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

  • Firefox




相關用法


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