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


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


該屬性用於定義當 displaystyle 為 false 時,附加的下標和上標是否移動到下標和上標位置。 <mo> 標簽接受此屬性。

用法:

<element movablelimits="true|false">

屬性值:

  • true: 它使操作符可以移動。
  • false: 它阻止操作符移動。

下麵的示例說明了 HTML5 MathML 中的可移動限製:

例子:

HTML


<!DOCTYPE html> 
<html> 
<head> 
    <title>HTML5 MathML movablelimits Attribute</title> 
</head> 
<body> 
    <center> 
        <h1 style="color:green"> 
            GeeksforGeeks 
        </h1> 
        <h3>HTML5 MathML movablelimits Attribute</h3> 
        <math> 
            <mi>GeeksforGeeks</mi> 
            <mo movablelimits="false">=</mo> 
            <mtable displaystyle="false"
                    frame="solid" rowlines="dashed"
                    align="axis 1"> 
                <mtr mathbackground="green;"> 
                    <mtd>Course</mtd> 
                    <mtd>Fee</mtd> 
                </mtr> 
                <mtr> 
                    <mtd> 
                        <mi>C++ STL</mi> 
                    </mtd> 
                    <mtd> 
                        <mi> 1499</mi> 
                    </mtd> 
                </mtr> 
                <mtr> 
                    <mtd> 
                        <mi>Placement 100 </mi> 
                    </mtd> 
                    <mtd> 
                        <mi>9999 </mi> 
                    </mtd> 
                </mtr> 
                <mtr> 
                    <mtd> 
                        <mi>DSA Foundation </mi> 
                    </mtd> 
                    <mtd> 
                        <mi>7999</mi> 
                    </mtd> 
                </mtr> 
            </mtable> 
        </math> 
    </center> 
</body> 
</html> 

輸出:

支持的瀏覽器: HTML5 MathML movinglimits 屬性支持的瀏覽器如下所示:

  • Firefox


相關用法


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