From 4c48208c5426b4db829446be2076bf421b75f99f Mon Sep 17 00:00:00 2001 From: A1lo Date: Mon, 13 Dec 2021 01:44:49 +0800 Subject: Fix syntax error in Web/HTML/Element/var, zh-CN (#3319) * fix: fix live sample for web\html\element\var * fix: remove the wrong
tag and fix the link --- files/zh-cn/web/html/element/var/index.html | 51 +++++++---------------------- 1 file changed, 11 insertions(+), 40 deletions(-) (limited to 'files/zh-cn/web/html') 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 --- -
- -
{{HTMLRef}}
-
-
HTML Variable元素(<var>)表示数学表达式或编程上下文中的变量名称。尽管该行为取决于浏览器,但通常使用当前字体的斜体形式显示。

概述

@@ -32,25 +27,25 @@ translation_of: Web/HTML/Element/var 允许的父级元素 - Any element that accepts phrasing content. + Any element that accepts phrasing content. 规范元素 - HTML, "The var element" + HTML, "The var element"

属性

-

本元素仅支持 全局属性.

+

本元素仅支持 全局属性.

DOM 接口

-

本元素支持 HTMLElement 接口

+

本元素支持 HTMLElement 接口

-

提示: Gecko 1.9.2 开始, Firefox支持本元素使用 HTMLSpanElement 接口。

+

提示: Gecko 1.9.2 开始, Firefox支持本元素使用 HTMLSpanElement 接口。

默认样式

@@ -73,24 +68,23 @@ translation_of: Web/HTML/Element/var

{{EmbedLiveSample("Basic_example", 650,80)}}

-

Overriding the default style

-

Using CSS, you can override the default style for the <var> element. In this example, variable names are rendered using bold Courier if it's available, otherwise it falls back to the default monospace font.

+

Using CSS, you can override the default style for the <var> element. In this example, variable names are rendered using bold Courier if it's available, otherwise it falls back to the default monospace font.

CSS

-
var {
+
var {
   font: bold 15px "Courier", "Courier New", monospace;
 }

HTML

-
<p>The variables <var>minSpeed</var> and <var>maxSpeed</var> control
+
<p>The variables <var>minSpeed</var> and <var>maxSpeed</var> control
    the minimum and maximum speed of the apparatus in revolutions
    per minute (RPM).</p>
-

This HTML uses <var> to enclose the names of two variables.

+

This HTML uses <var> to enclose the names of two variables.

Result

@@ -98,31 +92,8 @@ translation_of: Web/HTML/Element/var

Specifications

- - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-var-element', '<var>')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5 W3C', 'textlevel-semantics.html#the-var-element', '<var>')}}{{Spec2('HTML5 W3C')}}
+
{{Specifications}}

Browser compatibility

-

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

- -

{{Compat("html.elements.var")}}

-
+
{{Compat}}
-- cgit v1.2.3-54-g00ecf