aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/mathml/element/mroot/index.html
blob: 284ce119855138031e37d396358ceedc4636abce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: <mroot>
slug: Web/MathML/Element/mroot
translation_of: Web/MathML/Element/mroot
---
<div>{{MathMLRef}}</div>

<p class="summary">MathML的<strong><code>&lt;mroot&gt;</code></strong>元素用来表示一个有明确根指数的根式。它接受两个参数,语法如下:<code><strong>&lt;mroot&gt; base index &lt;/mroot&gt;</strong></code></p>

<h2 id="属性">属性</h2>

<dl>
 <dt id="attr-class-id-style">class, id, style</dt>
 <dd><a href="/en-US/docs/CSS">样式表</a>使用。</dd>
 <dt id="attr-href">href</dt>
 <dd>用来设置标签点击后跳转的链接。</dd>
 <dt id="attr-mathbackground">mathbackground</dt>
 <dd>用来设置标签的背景色,可以使用<code><strong>#rgb</strong></code><strong><code>#rrggbb</code></strong>或者<a href="/zh-CN/docs/Web/CSS/color_value">HTML颜色名</a></dd>
 <dt id="attr-mathcolor">mathcolor</dt>
 <dd>用来设置文字(包括根底数、根指数和根号本身)的颜色,同样可以使用<code><strong>#rgb</strong></code><strong><code>#rrggbb</code></strong>或者<a href="/zh-CN/docs/Web/CSS/color_value">HTML颜色名</a></dd>
</dl>

<h2 id="例子">例子</h2>

<p>下述代码表示:<img alt="x" src="/files/3200/mroot.png" style="margin-left: 10px; vertical-align: middle;"></p>

<p>您的浏览器的渲染结果:<math><mroot><mi>x</mi> <mn>3</mn> </mroot> </math></p>

<pre class="brush: html">&lt;math&gt;

 &lt;mroot&gt;
    &lt;mi&gt;x&lt;/mi&gt;
    &lt;mn&gt;3&lt;/mn&gt;
 &lt;/mroot&gt;

&lt;/math&gt;
</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{ SpecName('MathML3', 'chapter3.html#presm.mroot', 'mroot') }}</td>
   <td>{{ Spec2('MathML3') }}</td>
   <td>Current specification</td>
  </tr>
  <tr>
   <td>{{ SpecName('MathML2', 'chapter3.html#presm.mroot', 'mroot') }}</td>
   <td>{{ Spec2('MathML2') }}</td>
   <td>Initial specification</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

{{Compat("mathml.elements.mroot")}}

<h2 id="相关链接">相关链接</h2>

<ul>
 <li>{{ MathMLElement("msqrt") }} (Square root without an index)</li>
</ul>