aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html
diff options
context:
space:
mode:
authorA1lo <yin199909@aliyun.com>2021-12-13 01:44:49 +0800
committerGitHub <noreply@github.com>2021-12-13 01:44:49 +0800
commit4c48208c5426b4db829446be2076bf421b75f99f (patch)
treedf29fcbe0692487a8d1f859322641db0681d9fa9 /files/zh-cn/web/html
parenta1bec3ff365a7dbb2a28524a5b4cb4cc20e742e7 (diff)
downloadtranslated-content-4c48208c5426b4db829446be2076bf421b75f99f.tar.gz
translated-content-4c48208c5426b4db829446be2076bf421b75f99f.tar.bz2
translated-content-4c48208c5426b4db829446be2076bf421b75f99f.zip
Fix syntax error in Web/HTML/Element/var, zh-CN (#3319)
* fix: fix live sample for web\html\element\var * fix: remove the wrong <div> tag and fix the link
Diffstat (limited to 'files/zh-cn/web/html')
-rw-r--r--files/zh-cn/web/html/element/var/index.html51
1 files changed, 11 insertions, 40 deletions
diff --git a/files/zh-cn/web/html/element/var/index.html b/files/zh-cn/web/html/element/var/index.html
index 25c6460a5f..8b6e979878 100644
--- a/files/zh-cn/web/html/element/var/index.html
+++ b/files/zh-cn/web/html/element/var/index.html
@@ -6,14 +6,9 @@ tags:
- Web
translation_of: Web/HTML/Element/var
---
-<div></div>
-
-<div></div>
<div>{{HTMLRef}}</div>
-<div></div>
-
<div>HTML Variable元素(&lt;var&gt;)表示数学表达式或编程上下文中的变量名称。尽管该行为取决于浏览器,但通常使用当前字体的斜体形式显示。</div>
<h2 id="概述">概述</h2>
@@ -32,25 +27,25 @@ translation_of: Web/HTML/Element/var
</tr>
<tr>
<td>允许的父级元素</td>
- <td>Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>.</td>
+ <td>Any element that accepts <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories#短语元素(phrasing content)">phrasing content</a>.</td>
</tr>
<tr>
<td>规范元素</td>
- <td><a href="http://www.whatwg.org/html/#the-var-element">HTML, "The <code>var</code> element"</a></td>
+ <td><a href="https://www.whatwg.org/html/#the-var-element">HTML, "The <code>var</code> element"</a></td>
</tr>
</tbody>
</table>
<h2 id="属性">属性</h2>
-<p><span style="line-height: 21px;">本元素仅支持 </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">全局属性</a><span style="line-height: 21px;">.</span></p>
+<p><span style="line-height: 21px;">本元素仅支持 </span><a href="/zh-CN/docs/Web/HTML/Global_attributes" title="HTML/Global attributes">全局属性</a><span style="line-height: 21px;">.</span></p>
<h2 id="DOM_接口">DOM 接口</h2>
-<p>本元素支持 <code><a href="/en-US/docs/DOM/element" title="DOM/element">HTMLElement</a></code> 接口</p>
+<p>本元素支持 <code><a href="/zh-CN/docs/Web/API/Element" title="DOM/element">HTMLElement</a></code> 接口</p>
<div class="note">
-<p><strong>提示: </strong>Gecko 1.9.2 开始, Firefox支持本元素使用 <a href="/en-US/docs/DOM/span" title="DOM/span"><span style="font-family: courier new;">HTMLSpanElement</span></a> 接口。</p>
+<p><strong>提示: </strong>Gecko 1.9.2 开始, Firefox支持本元素使用 <a href="/zh-CN/docs/Web/API/HTMLSpanElement">HTMLSpanElement</a> 接口。</p>
</div>
<h2 id="默认样式">默认样式</h2>
@@ -73,24 +68,23 @@ translation_of: Web/HTML/Element/var
<p>{{EmbedLiveSample("Basic_example", 650,80)}}</p>
</div>
-<div>
<h3 id="Overriding_the_default_style">Overriding the default style</h3>
-<p>Using CSS, you can override the default style for the <code>&lt;var&gt;</code> element. In this example, variable names are rendered using bold Courier if it's available, otherwise it falls back to the default monospace font.</p>
+<p>Using CSS, you can override the default style for the <code>&lt;var&gt;</code> element. In this example, variable names are rendered using bold Courier if it's available, otherwise it falls back to the default monospace font.</p>
<h4 id="CSS">CSS</h4>
-<pre>var {
+<pre class="brush:css">var {
font: bold 15px "Courier", "Courier New", monospace;
}</pre>
<h4 id="HTML">HTML</h4>
-<pre>&lt;p&gt;The variables &lt;var&gt;minSpeed&lt;/var&gt; and &lt;var&gt;maxSpeed&lt;/var&gt; control
+<pre class="brush:html">&lt;p&gt;The variables &lt;var&gt;minSpeed&lt;/var&gt; and &lt;var&gt;maxSpeed&lt;/var&gt; control
the minimum and maximum speed of the apparatus in revolutions
per minute (RPM).&lt;/p&gt;</pre>
-<p>This HTML uses <code>&lt;var&gt;</code> to enclose the names of two variables.</p>
+<p>This HTML uses <code>&lt;var&gt;</code> to enclose the names of two variables.</p>
<h4 id="Result">Result</h4>
@@ -98,31 +92,8 @@ translation_of: Web/HTML/Element/var
<h2 id="Specifications">Specifications</h2>
-<table>
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-var-element', '&lt;var&gt;')}}</td>
- <td>{{Spec2('HTML WHATWG')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('HTML5 W3C', 'textlevel-semantics.html#the-var-element', '&lt;var&gt;')}}</td>
- <td>{{Spec2('HTML5 W3C')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
+<div>{{Specifications}}</div>
<h2 id="Browser_compatibility">Browser compatibility</h2>
-<p>The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
-
-<p>{{Compat("html.elements.var")}}</p>
-</div>
+<div>{{Compat}}</div>