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


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


此屬性保存單元格可以擴展多少行的值。此屬性僅由<mtd>標記接受。

用法:

<element rowspan="non-negative-int">

屬性值:

  • 非負整數:該值包含創建按行跨距的整數。

下麵的示例說明了HTML MathML中的行跨度:

例:



HTML

<!DOCTYPE html>  
<html>  
  
<head>  
    <title>HTML5 MathML rowspan Attribute</title>  
</head>  
  
<body>  
    <center>  
        <h1 style="color:green">  
            GeeksforGeeks  
        </h1>  
  
        <h3>HTML5 MathML rowspan Attribute</h3>  
  
        <math>  
            <mi>GeeksforGeeks</mi>  
            <mo>=</mo>  
            <mtable frame="solid" columnlines="dashed">  
                <mtr mathbackground="green;">  
                    <mtd>Course</mtd> 
                    <mtd rowspan="4">Date</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 rowspan屬性支持的瀏覽器:

  • Firefox




相關用法


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