MathML <style>標記是HTML5中的內置標記。此標記用於更改子元素的樣式。該標簽適用於HTML5 MathML庫中包含的標簽。
用法:
<mstyle attribute="value"> children tags </style>
屬性:此標記接受一些屬性,如下所述:
- decimalpoint:如果對齊值以小數點表示,則此屬性保存對齊值。
- dir:此屬性保存方向值。兩種類型的方向值是可接受的ltr(從左到右)和rtl(從右到左)。
- displaystyle:此屬性保留用於顯示方程式的更多垂直空間,或者為n布爾值。如果將其設置為true,則將顯示較大版本的運算符。它部分取決於<mo>標記的bigop和movinglimits。
- scriptlevel:此屬性將值保留為font-size上的ctrols。它的工作方式類似於優先權偏好,這意味著優先權值越高,性能越低。這意味著腳本級別越高,font-size越小。
- scriptminsize:此屬性保存因腳本級別的更改而用於調整字體大小的乘數值。其默認值為0.71。
以下示例說明了HTML5 MathMl <mstyle>標簽:
例:
<!DOCTYPE html>
<html>
<head>
<title>HTML5 MathML <mstyle> tag</title>
</head>
<body>
<center>
<h1 style="color:green">
GeeksforGeeks
</h1>
<h3>HTML5 MathML <mstyle> tag</h3>
<math>
<mstyle displaystyle="true"
mathcolor="lightgreen">
<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 <mstyle>標記支持的瀏覽器:
- Firefox
相關用法
- HTML5 MathML <mo>標記用法及代碼示例
- HTML5 MathML <mtr>標記用法及代碼示例
- HTML5 MathML <mth>標記用法及代碼示例
- HTML5 MathML <mtd>標記用法及代碼示例
- HTML5 MathML <ms>標記用法及代碼示例
- HTML5 MathML <mi>標記用法及代碼示例
- HTML5 MathML <mn>標記用法及代碼示例
- HTML5 MathML <mglyph>標記用法及代碼示例
- HTML5 MathML <mmultiscripts>標記用法及代碼示例
- HTML5 MathML <merror>標記用法及代碼示例
- HTML5 MathML <mover>標記用法及代碼示例
- HTML5 MathML <msqrt>標記用法及代碼示例
- HTML5 MathML <mfrac>標記用法及代碼示例
- HTML5 MathML <msubsup>標記用法及代碼示例
- HTML5 MathML <math>標記用法及代碼示例
注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 HTML5 | MathML <style> Tag。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。