mathbackground 全局属性设置 MathML 元素的颜色。
[!NOTE] 尽可能使用 CSS 来为 MathML 设置样式。
mathcolor属性应仅在不支持 CSS 并且将被 CSScolor属性值覆盖的应用程序中使用。
语法
<math mathcolor="currentcolor">
<math mathcolor="red">
<math mathcolor="orange">
<math mathcolor="tan">
<math mathcolor="rebeccapurple">
<math mathcolor="#090">
<math mathcolor="#009900">
<math mathcolor="#090a">
<math mathcolor="#009900aa">
<math mathcolor="rgb(34, 12, 64, 0.6)">
<math mathcolor="rgb(34 12 64 / 0.6)">
<math mathcolor="rgb(34.6 12 64 / 60%)">
<math mathcolor="hsl(30, 100%, 50%, 0.6)">
<math mathcolor="hsl(30 100% 50% / 0.6)">
<math mathcolor="hsl(30.2 100% 50% / 60%)">
<math mathcolor="hwb(90 10% 10%)">
<math mathcolor="hwb(90 10% 10% / 0.5)">
<math mathcolor="hwb(90deg 10% 10%)">
<math mathcolor="hwb(1.5708rad 60% 0%)">
<math mathcolor="hwb(.25turn 0% 40% / 50%)">
可选值
- <color>
- : 设置元素的文本和装饰部分的颜色,包括例如分数线或根号符号等。
规范
- 在 MathML 3 和更早版本中,支持的值集更有限。自 MathML 核心版本以来,语法与 CSS <color> 值相匹配。
- 此属性旨在用于不支持 CSS 的 MathML 应用程序。自 MathML 核心版本以来,推荐使用等效的 CSS。
浏览器兼容性
参见
- 所有全局属性
- color
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
