mathbackground

已棄用:此功能不再推薦。儘管某些瀏覽器可能仍然支援它,但它可能已從相關的 Web 標準中刪除,可能正在被刪除過程中,或者可能僅出於相容性目的而保留。避免使用它,如果可能,更新現有程式碼;請參閱本頁底部的相容性表以指導您的決策。請注意,此功能可能隨時停止工作。

mathbackground 全域性屬性設定 MathML 元素的背景顏色

注意:儘可能使用 CSS 樣式化 MathML。mathbackground 屬性僅應包含在不瞭解 CSS 的應用程式中,並且如果設定,將被 CSS background-color 屬性值覆蓋。

語法

html
<!-- Keyword values -->
<math mathbackground="red">
<math mathbackground="indigo">

<!-- Hexadecimal value -->
<math mathbackground="#bbff00"> <!-- Fully opaque -->
<math mathbackground="#bf0"> <!-- Fully opaque shorthand -->
<math mathbackground="#11ffee00"> <!-- Fully transparent -->
<math mathbackground="#1fe0"> <!-- Fully transparent shorthand -->
<math mathbackground="#11ffeeff"> <!-- Fully opaque -->
<math mathbackground="#1fef"> <!-- Fully opaque shorthand -->

<!-- RGB value -->
<math mathbackground="rgb(255 255 128)"> <!-- Fully opaque -->
<math mathbackground="rgb(117 190 218 / 50%)"> <!-- 50% transparent -->

<!-- HSL value -->
<math mathbackground="hsl(50 33% 25%)"> <!-- Fully opaque -->
<math mathbackground="hsl(50 33% 25% / 75%)"> <!-- 75% opaque, i.e. 25% transparent -->

<color>

背景的統一顏色。

規範

規範
MathML Core
# dfn-mathbackground
  • 在 MathML 3 和更早版本中,支援更有限的值集。自 MathML Core 以來,語法與 CSS <color> 值匹配。
  • 此屬性是為不瞭解 CSS 的 MathML 應用程式設計的。自 MathML Core 以來,建議改用等效的 CSS。

瀏覽器相容性

BCD 表僅在啟用 JavaScript 的瀏覽器中載入。

另請參閱