Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh-cn: batch space fix part 3 #15575

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/element/input/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ nameInput.addEventListener("invalid", () => {
- 如果它是有效的,它就会像你所期望的那样提交。要做到这一点,必须取消自定义的有效性,通过使用空字符串调用 `setCustomValidity()` 来实现。我们在每次 `input` 事件发生时都要这样做。如果你不这样做,并且之前设置了一个自定义的有效性,那么输入将会认为无效,即使它目前包含一个有效的提交值。

> **备注:** 始终在客户端和服务器端验证输入约束。约束验证并不能消除在*服务器端*进行验证的必要性。无效的值仍然可以由旧的浏览器或坏的行为者发送。
> **备注:** Firefox 在许多版本中支持一个专有的错误属性——`x-moz-errormessage`,它允许你以类似的方式设置自定义错误信息。从第 66 版开始,这个属性已被移除(见[Firefox bug 1513890](https://bugzil.la/1513890))。
> **备注:** Firefox 在许多版本中支持一个专有的错误属性——`x-moz-errormessage`,它允许你以类似的方式设置自定义错误信息。从第 66 版开始,这个属性已被移除(见 [Firefox bug 1513890](https://bugzil.la/1513890))。

### 本地化

Expand Down
8 changes: 4 additions & 4 deletions files/zh-cn/web/html/element/link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ slug: Web/HTML/Element/link
> **备注:** 只有存在 rel=“preload”或 rel=“prefetch”时,importance 属性才能用于\<link>元素。

- `integrity` {{experimental_inline}}
- : 包含行内元数据,它是一个你用浏览器获取的资源文件的哈希值,以 base64 编码的方式加的密,这样用户能用它来验证一个获取到的资源,在传送时未被非法篡改,详情查看[Subresource Integrity](/zh-CN/docs/Web/Security/Subresource_Integrity)。
- : 包含行内元数据,它是一个你用浏览器获取的资源文件的哈希值,以 base64 编码的方式加的密,这样用户能用它来验证一个获取到的资源,在传送时未被非法篡改,详情查看 [Subresource Integrity](/zh-CN/docs/Web/Security/Subresource_Integrity)。
- `media`
- : 这个属性规定了外部资源适用的媒体类型。它的值必须是"[媒体查询](/zh-CN/docs/Web/Guide/CSS/Media_queries)"。这个属性使得用户代理能选择最适合设备运行的媒体类型。
- 在 HTML 4 中,该属性只能是一组以空白符作为分隔的媒体描述文字,比如"[媒体类型](/zh-CN/docs/Web/CSS/@media)"规定了该元素可取的属性,如 print、screen、aural、braille。HTML5 将该属性值扩展为任意类型的"[媒体查询](/zh-CN/docs/CSS/Media_queries)","媒体查询"将 HTML4 的属性值都包括在内。
Expand All @@ -124,7 +124,7 @@ slug: Web/HTML/Element/link
- : 此属性命名链接文档与当前文档的关系。该属性必须是[链接类型值](/zh-CN/docs/Web/HTML/Link_types)的用空格分隔的列表。
- `sizes`

- : 这个属性定义了包含相应资源的可视化媒体中的 icons 的大小。它只有在[`rel`](/zh-CN/docs/Web/HTML/Element/link#rel)包含 icon 的[link 类型值](/zh-CN/docs/Web/HTML/Link_types)。它可能有如下的规则。
- : 这个属性定义了包含相应资源的可视化媒体中的 icons 的大小。它只有在[`rel`](/zh-CN/docs/Web/HTML/Element/link#rel)包含 icon 的 [link 类型值](/zh-CN/docs/Web/HTML/Link_types)。它可能有如下的规则。

- `any` 表示图标可以按矢量格式缩放到任意大小,例如 `image/svg+xml`。
- 一个由空白符分隔的尺寸列表。每一个都以`<width in pixels>x<height in pixels>` 或 `<width in pixels>X<height in pixels>给出。`尺寸列表中的每一个尺寸都必须包含在资源里。
Expand Down Expand Up @@ -157,7 +157,7 @@ slug: Web/HTML/Element/link

- `rev`{{Deprecated_Inline}}

- : 此属性的值显示了 [`href`](/zh-CN/docs/Web/HTML/Element/link#href) 属性所定义的当前文档与链接文档的关系。因此,该属性定义了与 rel 属性的值相比的反向关系。该属性的[Link type value](/zh-CN/docs/Web/HTML/Link_types)类似于[`rel`](/zh-CN/docs/Web/HTML/Element/link#rel)的可能值。
- : 此属性的值显示了 [`href`](/zh-CN/docs/Web/HTML/Element/link#href) 属性所定义的当前文档与链接文档的关系。因此,该属性定义了与 rel 属性的值相比的反向关系。该属性的 [Link type value](/zh-CN/docs/Web/HTML/Link_types)类似于[`rel`](/zh-CN/docs/Web/HTML/Element/link#rel)的可能值。

> **备注:** WHATWG HTML 生活标准(MDN 将其视为规范的规范)认为该属性已过时。但是,值得注意的是,rev 在 W3C 规范中并未过时。就是说,鉴于不确定性,依靠 rev 是不明智的。相反,你应该使用具有相反链接类型值的[`rel`](/zh-CN/docs/Web/HTML/Element/link#rel)属性。例如,要建立反向链接,请指定作者。而且,即使许多站点都以这种方式滥用此属性,该属性也不代表“修订”,并且不得与版本号一起使用。

Expand Down Expand Up @@ -249,7 +249,7 @@ slug: Web/HTML/Element/link

### 预加载例子

你可以在[Preloading content with rel="preload"](/zh-CN/docs/Web/HTML/Preloading_content)找到`<link rel="preload">`的详细例子。
你可以在 [Preloading content with rel="preload"](/zh-CN/docs/Web/HTML/Preloading_content)找到`<link rel="preload">`的详细例子。

## 概要

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/element/mark/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ HTML 标记文本元素 (< Mark >) 表示为引用或符号目的而标记或突
- _内容分类_ [Flow content](/zh-CN/docs/HTML/Content_categories#Flow_content), [phrasing content](/zh-CN/docs/HTML/Content_categories#Phrasing_content), palpable content.
- _允许的内容_ [Phrasing content](/zh-CN/docs/HTML/Content_categories#Phrasing_content).
- _标签省略_ {{no_tag_omission}}
- *允许的父元素*任何接受[phrasing content](/zh-CN/docs/HTML/Content_categories#Phrasing_content) 的元素。
- *允许的父元素*任何接受 [phrasing content](/zh-CN/docs/HTML/Content_categories#Phrasing_content) 的元素。
- _DOM 接口_ {{domxref("HTMLElement")}}

## 属性
Expand Down
4 changes: 2 additions & 2 deletions files/zh-cn/web/html/element/p/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ slug: Web/HTML/Element/p
- _[内容分类](/zh-CN/docs/Web/HTML/Content_categories)_ [Flow content](/zh-CN/docs/Web/HTML/Content_categories#Flow_content), palpable content.
- _允许的内容_ [Phrasing content](/zh-CN/docs/Web/HTML/Content_categories#Phrasing_content).
- *标签省略*起始标签是必需的,结束标签在以下情形中可以省略。\<p>元素后紧跟{{HTMLElement("address")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("blockquote")}}, {{HTMLElement("div")}}, {{HTMLElement("dl")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("footer")}}, {{HTMLElement("form")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("header")}}, {{HTMLElement("hr")}}, {{HTMLElement("menu")}}, {{HTMLElement("nav")}}, {{HTMLElement("ol")}}, {{HTMLElement("pre")}}, {{HTMLElement("section")}}, {{HTMLElement("table")}}, {{HTMLElement("ul")}}或另一个{{HTMLElement("p")}}元素;或者父元素中没有其他内容了,而且父元素不是{{HTMLElement("a")}}元素
- *允许的父元素*任何接受[flow content](/zh-CN/docs/Web/HTML/Content_categories#Flow_content)的元素
- *允许的父元素*任何接受 [flow content](/zh-CN/docs/Web/HTML/Content_categories#Flow_content)的元素
- _DOM 接口_ {{domxref("HTMLParagraphElement")}}

## 属性
Expand All @@ -32,7 +32,7 @@ slug: Web/HTML/Element/p

## 注意

使用[CSS](/zh-CN/docs/Web/CSS) {{cssxref("margin")}}属性去改变段落之间的间隙,**不要**在段落之间插入空的段落元素或者{{HTMLElement("br")}}元素。
使用 [CSS](/zh-CN/docs/Web/CSS) {{cssxref("margin")}}属性去改变段落之间的间隙,**不要**在段落之间插入空的段落元素或者{{HTMLElement("br")}}元素。

## 规范

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/element/samp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ slug: Web/HTML/Element/samp

该元素实现了 [`HTMLElement`](/zh-CN/DOM/element) 接口。

> **备注:** 基于 Gecko 1.9.2 及以上,Firefox 还为该元素实现了[HTMLSpanElement](/zh-CN/DOM/span) 接口。
> **备注:** 基于 Gecko 1.9.2 及以上,Firefox 还为该元素实现了 [HTMLSpanElement](/zh-CN/DOM/span) 接口。

## 示例

Expand Down
4 changes: 2 additions & 2 deletions files/zh-cn/web/html/element/slot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: Web/HTML/Element/slot

{{HTMLSidebar}}

> **备注:** 本翻译的一些术语参考了[Vuejs-中文](https://cn.vuejs.org/v2/guide/components-slots.html)页面。
> **备注:** 本翻译的一些术语参考了 [Vuejs-中文](https://cn.vuejs.org/v2/guide/components-slots.html)页面。

**HTML `<slot>` 元素**,作为 [Web Component](/zh-CN/docs/Web/API/Web_components) 技术套件的一部分,是 Web 组件内的一个占位符。该占位符可以在后期使用自己的标记语言填充,这样你就可以创建单独的 DOM 树,并将它与其他的组件组合在一起。

Expand Down Expand Up @@ -95,7 +95,7 @@ slug: Web/HTML/Element/slot
</template>
```

> **备注:** 你可以在 [element-details](https://github.com/mdn/web-components-examples/tree/master/element-details) (see it [running live](https://mdn.github.io/web-components-examples/element-details/)) 找到这个示例的完整演示版。另外,你也可以在[Using templates and slots](/zh-CN/docs/Web/API/Web_components/Using_templates_and_slots)这里找到具体的解释。
> **备注:** 你可以在 [element-details](https://github.com/mdn/web-components-examples/tree/master/element-details) (see it [running live](https://mdn.github.io/web-components-examples/element-details/)) 找到这个示例的完整演示版。另外,你也可以在 [Using templates and slots](/zh-CN/docs/Web/API/Web_components/Using_templates_and_slots)这里找到具体的解释。

## 规范

Expand Down
8 changes: 4 additions & 4 deletions files/zh-cn/web/html/element/style/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ slug: Web/HTML/Element/style

## 概要

**HTML** 的 `<style>` 元素包含文档的样式信息或者文档的部分内容。默认情况下,该标签的样式信息通常是[CSS](/zh-CN/docs/Web/CSS)的格式。
**HTML** 的 `<style>` 元素包含文档的样式信息或者文档的部分内容。默认情况下,该标签的样式信息通常是 [CSS](/zh-CN/docs/Web/CSS)的格式。

{{EmbedInteractiveExample("pages/tabbed/style.html", "tabbed-standard")}}

Expand All @@ -25,17 +25,17 @@ slug: Web/HTML/Element/style
- `type`
- : 该属性以 MIME 类型(不应该指定字符集)定义样式语言。如果该属性未指定,则默认为 `text/css`。
- `media`
- : 该属性规定该样式适用于哪个媒体。属性的取值[CSS 媒体查询](/zh-CN/docs/Web/Guide/CSS/Media_queries),默认值为 `all`。
- : 该属性规定该样式适用于哪个媒体。属性的取值 [CSS 媒体查询](/zh-CN/docs/Web/Guide/CSS/Media_queries),默认值为 `all`。
- `nonce`
- : 一种加密的随机数(一次使用的数字),用于在[style-src Content-Security-Policy](/zh-CN/docs/Web/HTTP/Headers/Content-Security-Policy/style-src)中将内联样式列入白名单。服务器每次发送策略时都必须生成一个唯一的随机数值。提供一个无法猜测的随机数非常重要,因为绕开资源策略是微不足道的。
- : 一种加密的随机数(一次使用的数字),用于在 [style-src Content-Security-Policy](/zh-CN/docs/Web/HTTP/Headers/Content-Security-Policy/style-src)中将内联样式列入白名单。服务器每次发送策略时都必须生成一个唯一的随机数值。提供一个无法猜测的随机数非常重要,因为绕开资源策略是微不足道的。
- `title`
- : 指定可选的样式表。

### 已淘汰属性

- `scoped` {{non-standard_inline}} {{deprecated_inline}}
- : 此属性指定样式仅适用于其父项和子项的元素。
> **备注:** 以后可能会根据<https://github.com/w3c/csswg-drafts/issues/3547>重新引入此属性。如果要立即使用该属性,则可以使用[polyfill](https://github.com/samthor/scoped)。
> **备注:** 以后可能会根据<https://github.com/w3c/csswg-drafts/issues/3547>重新引入此属性。如果要立即使用该属性,则可以使用 [polyfill](https://github.com/samthor/scoped)。

## 示例

Expand Down
4 changes: 2 additions & 2 deletions files/zh-cn/web/html/element/tfoot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ HTML 元素 **`<tfoot>`** 定义了一组表格中各列的汇总行。

- `bgcolor` {{Non-standard_inline}}

- : 此属性定义了列内单元格的背景色。定义此属性使用'#'作为前缀,其后是定义于[sRGB](https://www.w3.org/Graphics/Color/sRGB)的 6 位十六进制码。也可使用 16 种预定义的色彩字符串之一。
- : 此属性定义了列内单元格的背景色。定义此属性使用'#'作为前缀,其后是定义于 [sRGB](https://www.w3.org/Graphics/Color/sRGB)的 6 位十六进制码。也可使用 16 种预定义的色彩字符串之一。

> **备注:** 请勿使用此属性,因为这并非标准,且只有某些特定版本的 Microsoft Internet Explorer(IE 浏览器)支持:{{HTMLElement("tfoot")}}元素应使用[CSS](/zh-CN/docs/Web/CSS)设计。若想得到与**bgcolor**属性相似的效果,可在相关的 {{HTMLElement("td")}}或{{HTMLElement("th")}}元素中使用[CSS](/zh-CN/docs/Web/CSS) {{cssxref("background-color")}}属性。
> **备注:** 请勿使用此属性,因为这并非标准,且只有某些特定版本的 Microsoft Internet Explorer(IE 浏览器)支持:{{HTMLElement("tfoot")}}元素应使用 [CSS](/zh-CN/docs/Web/CSS)设计。若想得到与**bgcolor**属性相似的效果,可在相关的 {{HTMLElement("td")}}或{{HTMLElement("th")}}元素中使用 [CSS](/zh-CN/docs/Web/CSS) {{cssxref("background-color")}}属性。

- `char` {{Deprecated_inline}}

Expand Down
8 changes: 4 additions & 4 deletions files/zh-cn/web/html/element/th/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ slug: Web/HTML/Element/th

- `bgcolor` {{Non-standard_inline}}

- : 这个属性定义了每列中每单元格的背景色。它由带有‘#’前缀的 6 位数的十六进制码组成,并在[sRGB](https://www.w3.org/Graphics/Color/sRGB)中被定义。这个属性可能会用到十六个预定义的颜色字符串儿之一。
- : 这个属性定义了每列中每单元格的背景色。它由带有‘#’前缀的 6 位数的十六进制码组成,并在 [sRGB](https://www.w3.org/Graphics/Color/sRGB)中被定义。这个属性可能会用到十六个预定义的颜色字符串儿之一。

> **备注:** 不要使用这个属性,它不是标准属性且仅在某些版本的 Microsoft Internet Explorer 支持:{{HTMLElement("th")}} 元素应当用[CSS](/zh-CN/docs/CSS)来样式化。为了创造出同样的效果只需要使用[CSS](/zh-CN/docs/CSS)中的{{cssxref("background-color")}}属性就可以啦。
> **备注:** 不要使用这个属性,它不是标准属性且仅在某些版本的 Microsoft Internet Explorer 支持:{{HTMLElement("th")}} 元素应当用 [CSS](/zh-CN/docs/CSS)来样式化。为了创造出同样的效果只需要使用 [CSS](/zh-CN/docs/CSS)中的{{cssxref("background-color")}}属性就可以啦。

- `char` {{Deprecated_inline}}

Expand Down Expand Up @@ -107,7 +107,7 @@ slug: Web/HTML/Element/th

- : 这个属性指定了单元格内文本的垂直对齐方式。这个属性可能有以下值:

- `baseline`: 将文本置于单元格底部并将其与字母的[baseline](https://en.wikipedia.org/wiki/Baseline_%28typography%29)对齐而不是与底部。若字母没有 `baseline` 以下的部分(即为无[降部](https://www.wikiwand.com/zh/%E9%99%8D%E9%83%A8))那么 `baseline` 值起到的效果便和 `bottom` 相同。
- `baseline`: 将文本置于单元格底部并将其与字母的 [baseline](https://en.wikipedia.org/wiki/Baseline_%28typography%29)对齐而不是与底部。若字母没有 `baseline` 以下的部分(即为无[降部](https://www.wikiwand.com/zh/%E9%99%8D%E9%83%A8))那么 `baseline` 值起到的效果便和 `bottom` 相同。
- `bottom`: 将文本置于底部。
- `middle`: 将文本置于单元格中央。
- `top`: 将文本置于单元格顶部。
Expand All @@ -116,7 +116,7 @@ slug: Web/HTML/Element/th

- `width` {{Deprecated_inline}}

- : 这个属性用来定义一个期望的单元格宽。额外的空间可以藉由[cellspacing](/zh-CN/docs/Web/API/HTMLTableElement/cellSpacing)和 [cellpadding](/zh-CN/docs/Web/API/HTMLTableElement/cellPadding) 属性来增加,并且{{HTMLElement("col")}}元素的宽也可以创造额外空间。但是,如果一列宽太窄以至于无法恰当显示 某单元格时,它会被自动加宽。
- : 这个属性用来定义一个期望的单元格宽。额外的空间可以藉由 [cellspacing](/zh-CN/docs/Web/API/HTMLTableElement/cellSpacing)和 [cellpadding](/zh-CN/docs/Web/API/HTMLTableElement/cellPadding) 属性来增加,并且{{HTMLElement("col")}}元素的宽也可以创造额外空间。但是,如果一列宽太窄以至于无法恰当显示 某单元格时,它会被自动加宽。

> **备注:** 不要使用这个属性,因为它已经在最新标准中过时。使用 CSS {{cssxref("width")}}属性代替。

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/element/video/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ slug: Web/HTML/Element/video

其他的使用注意事项:

- 如果你没有指定 `controls` 属性,那么视频不会展示浏览器自带的控件,你也可以用 JavaScript 和 {{domxref("HTMLMediaElement")}} API 来创建你自己的控件。详情请见[Creating a cross-browser video player](/zh-CN/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/cross_browser_video_player)。
- 如果你没有指定 `controls` 属性,那么视频不会展示浏览器自带的控件,你也可以用 JavaScript 和 {{domxref("HTMLMediaElement")}} API 来创建你自己的控件。详情请见 [Creating a cross-browser video player](/zh-CN/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/cross_browser_video_player)。
- `HTMLMediaElement` 会激活许多不同的[事件](/zh-CN/docs/Web/Guide/Events/Media_events),以便于让你可以控制视频(和音频)内容。
- 你可以用 CSS 属性 {{cssxref("object-position")}} 来调整视频在元素内部的位置,它可以控制视频尺寸适应于元素外框的方式。
- 如果想在视频里展示字幕或者标题,你可以在 {{htmlelement("track")}} 元素和 [WebVTT](/zh-CN/docs/Web/API/WebVTT_API) 格式的基础上使用 JavaScript 来实现。详情请见 [Adding captions and subtitles to HTML5 video](/zh-CN/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/Adding_captions_and_subtitles_to_HTML5_video)。
Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/element/xmp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ slug: Web/HTML/Element/xmp
>
> - 从 HTML3.2 开始反对使用本元素,同时它不再会在之后版本内被推荐使用。在 HTML5 规范内,本元素已经完全被移除。
> - 建议你使用{{HTMLElement("pre")}} 元素,如果有特殊需求,你可以使用 {{HTMLElement("code")}} 元素。需要你注意的是,使用元素的时候,需要将内容中的"<"转义为"\&lt;",以防止被浏览器当作正常标签解析。
> - 通过[CSS](/zh-CN/docs/CSS)样式表将 {{cssxref("font-family")}} 属性的值设置成为 generic-font,可以让任何其他任何标签获得等宽字体的样式。
> - 通过 [CSS](/zh-CN/docs/CSS)样式表将 {{cssxref("font-family")}} 属性的值设置成为 generic-font,可以让任何其他任何标签获得等宽字体的样式。

## 属性

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ slug: Web/HTML/Global_attributes/contextmenu

> **警告:** [contextmenu](https://html.spec.whatwg.org/multipage/obsolete.html#attr-contextmenu) 属性已经过时,将从所有浏览器中删除。

**`contextmenu`** [全局属性](/zh-CN/docs/Web/HTML/Global_attributes)是指用于某个元素的“上下文菜单”的{{HTMLElement("menu")}}的[ID](/zh-CN/docs/Web/HTML/Global_attributes/id)属性。上下文菜单是指在用户交互(例如右键点击)时出现的菜单。HTML5 允许我们自定义此菜单。这里有一些实现示例,包括嵌套菜单。
**`contextmenu`** [全局属性](/zh-CN/docs/Web/HTML/Global_attributes)是指用于某个元素的“上下文菜单”的{{HTMLElement("menu")}}的 [ID](/zh-CN/docs/Web/HTML/Global_attributes/id)属性。上下文菜单是指在用户交互(例如右键点击)时出现的菜单。HTML5 允许我们自定义此菜单。这里有一些实现示例,包括嵌套菜单。

## 示例

Expand Down
Loading