From a02f4b2f60c81e09b318a090e5c9c2d2d641c878 Mon Sep 17 00:00:00 2001 From: t7yang Date: Sat, 17 Jul 2021 16:10:02 +0800 Subject: replace wiki links in zh-CN --- files/zh-cn/web/html/attributes/index.html | 98 +++++++++++----------- files/zh-cn/web/html/element/audio/index.html | 48 +++++------ files/zh-cn/web/html/element/fieldset/index.html | 10 +-- files/zh-cn/web/html/element/form/index.html | 14 ++-- files/zh-cn/web/html/element/hgroup/index.html | 4 +- .../zh-cn/web/html/element/input/hidden/index.html | 2 +- files/zh-cn/web/html/element/input/index.html | 14 ++-- .../zh-cn/web/html/element/input/reset/index.html | 4 +- .../zh-cn/web/html/element/input/search/index.html | 2 +- files/zh-cn/web/html/element/link/index.html | 4 +- files/zh-cn/web/html/element/meta/index.html | 8 +- files/zh-cn/web/html/element/progress/index.html | 8 +- files/zh-cn/web/html/element/script/index.html | 4 +- files/zh-cn/web/html/element/select/index.html | 12 +-- files/zh-cn/web/html/element/style/index.html | 4 +- files/zh-cn/web/html/element/textarea/index.html | 10 +-- files/zh-cn/web/html/element/video/index.html | 2 +- .../html/global_attributes/data-_star_/index.html | 2 +- .../web/html/global_attributes/hidden/index.html | 2 +- 19 files changed, 126 insertions(+), 126 deletions(-) (limited to 'files/zh-cn/web/html') diff --git a/files/zh-cn/web/html/attributes/index.html b/files/zh-cn/web/html/attributes/index.html index 846e47bddd..eb514c19f5 100644 --- a/files/zh-cn/web/html/attributes/index.html +++ b/files/zh-cn/web/html/attributes/index.html @@ -25,64 +25,64 @@ translation_of: Web/HTML/Attributes - accept + accept {{ HTMLElement("form") }}, {{ HTMLElement("input") }} 服务器接受内容或文件类型的列表。 - accept-charset + accept-charset {{ HTMLElement("form") }} 支持的字符集列表。 - accesskey + accesskey 全局属性 定义键盘快捷键来激活或者聚焦元素 - action + action {{ HTMLElement("form") }} 表单信息提交的url地址,指向进行处理的程序。 - align + align {{ HTMLElement("applet") }}, {{ HTMLElement("caption") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }},  {{ HTMLElement("hr") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }},  {{ HTMLElement("td") }},  {{ HTMLElement("tfoot") }} , {{ HTMLElement("th") }}, {{ HTMLElement("thead") }}, {{ HTMLElement("tr") }} 设置元素的水平对齐。 - allow + allow {{ HTMLElement("iframe") }} Specifies a feature-policy for the iframe. - alt + alt

{{ HTMLElement("applet") }}, {{ HTMLElement("area") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}

在图片无法呈现时的替代文本。 - async + async {{ HTMLElement("script") }} 表示该脚本应该异步执行。 - autocapitalize - 全局属性 + autocapitalize + 全局属性 Sets whether input is automatically capitalized when entered by user - autocomplete + autocomplete {{ HTMLElement("form") }}, {{ HTMLElement("input") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }} 表示该表单中是否可以由浏览器自动完成填值。 - autofocus + autofocus {{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }} 在网页加载后该元素应该自动聚焦。 - autoplay + autoplay {{ HTMLElement("audio") }}, {{ HTMLElement("video") }}  audio或video应该自动播放 @@ -116,12 +116,12 @@ translation_of: Web/HTML/Attributes - buffered + buffered {{ HTMLElement("audio") }}, {{ HTMLElement("video") }} 包含已缓存媒体的时间范围。 - capture + capture {{ HTMLElement("input") }} From the HTML Media Capture
The definition of 'media capture' in that specification.
spec, specifies a new file can be captured. @@ -132,32 +132,32 @@ translation_of: Web/HTML/Attributes 与公钥一起提交的挑战字符。 - charset + charset {{ HTMLElement("meta") }}, {{ HTMLElement("script") }} 申明该页面或脚本的字符编码。 - checked + checked {{ HTMLElement("command") }}, {{ HTMLElement("input") }} 指出该元素在页面加载后是否处于选中状态。 - cite + cite {{ HTMLElement("blockquote") }}, {{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("q") }} 包含一个URI,用来指明引用或修改的源地址。 - class + class 全局属性 经常和CSS一起配合使用来修饰元素。 - code + code {{ HTMLElement("applet") }} 标明被加载和执行的applet类文件的URL。 - codebase + codebase {{ HTMLElement("applet") }} 指出存放applet类文件基本URL地址(绝对或相对),这些文件由code属性标明。 @@ -173,53 +173,53 @@ translation_of: Web/HTML/Attributes - cols + cols {{ HTMLElement("textarea") }} 定义一个textarea中包含多少列。 - colspan + colspan {{ HTMLElement("td") }}, {{ HTMLElement("th") }} 该属性一般用在td标签中,用于指定一个单元格占用多少列,例如:<td colspan='2'>表示占用一个单元格占2列. - content + content {{ HTMLElement("meta") }} A value associated with http-equiv or name depending on the context. - contenteditable + contenteditable 全局属性 指出该元素的内容是否可以被编辑。 - contextmenu + contextmenu 全局属性 定义将用作元素上下文菜单的{{HTMLElement("Menu")}}元素的ID。 - controls + controls {{ HTMLElement("audio") }}, {{ HTMLElement("video") }} 指出浏览器是否对用户显示播放控制台(前进或回退) - coords + coords {{ HTMLElement("area") }} A set of values specifying the coordinates of the hot-spot region. - crossorigin + crossorigin {{ HTMLElement("audio") }}, {{ HTMLElement("img") }}, {{ HTMLElement("link") }}, {{ HTMLElement("script") }}, {{ HTMLElement("video") }} How the element handles cross-origin requests - csp {{experimental_inline}} + csp {{experimental_inline}} {{ HTMLElement("iframe") }} Specifies the Content Security Policy that an embedded document must agree to enforce upon itself. -

data

+

data

{{ HTMLElement("object") }}

@@ -230,7 +230,7 @@ translation_of: Web/HTML/Attributes -

data-*

+

data-*

全局属性

@@ -240,77 +240,77 @@ translation_of: Web/HTML/Attributes - datetime + datetime {{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("time") }} Indicates the date and time associated with the element. - decoding + decoding {{ HTMLElement("img") }} Indicates the preferred method to decode the image. - default + default {{ HTMLElement("track") }} Indicates that the track should be enabled unless the user's preferences indicate something different. - defer + defer {{ HTMLElement("script") }} Indicates that the script should be executed after the page has been parsed. - dir + dir 全局属性 Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left) - dirname + dirname {{ HTMLElement("input") }}, {{ HTMLElement("textarea") }} - disabled + disabled {{ HTMLElement("button") }}, {{ HTMLElement("command") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("optgroup") }}, {{ HTMLElement("option") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }} Indicates whether the user can interact with the element. - download + download {{ HTMLElement("a") }}, {{ HTMLElement("area") }} Indicates that the hyperlink is to be used for downloading a resource. - draggable + draggable 全局属性 Defines whether the element can be dragged. - dropzone + dropzone 全局属性 Indicates that the element accept the dropping of content on it. - enctype + enctype {{ HTMLElement("form") }} Defines the content type of the form date when the method is POST. - enterkeyhint {{experimental_inline}} - {{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}, contenteditable + enterkeyhint {{experimental_inline}} + {{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}, contenteditable The enterkeyhint specifies what action label (or icon) to present for the enter key on virtual keyboards. The attribute can be used with form controls (such as the value of textarea elements), or in elements in an editing host (e.g., using contenteditable attribute). - for + for {{ HTMLElement("label") }}, {{ HTMLElement("output") }} 描述与当前元素绑定的元素。 - form + form {{ HTMLElement("button") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("label") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }} Indicates the form that is the owner of the element. - formaction + formaction <input><button> Indicates the action of the element, overriding the action defined in the <form>. @@ -689,5 +689,5 @@ translation_of: Web/HTML/Attributes

参见

diff --git a/files/zh-cn/web/html/element/audio/index.html b/files/zh-cn/web/html/element/audio/index.html index c7782d664a..a2b7a3a241 100644 --- a/files/zh-cn/web/html/element/audio/index.html +++ b/files/zh-cn/web/html/element/audio/index.html @@ -27,20 +27,20 @@ translation_of: Web/HTML/Element/audio
{{htmlattrdef("autoplay")}}
布尔值属性;声明该属性,音频会尽快自动播放,不会等待整个音频文件下载完成。
-

注意:自动播放音频(或有声视频)可能会破坏用户体验,所以应该尽可能避免。如果你一定要提供自动播放功能,你应该加入开关(让用户主动打开自动播放)。然而,如果需要创建一些媒体元素,其播放源由用户在稍后设置,自动播放就会很有用。想了解如果正确使用自动播放,可参见我们的自动播放指南

+

注意:自动播放音频(或有声视频)可能会破坏用户体验,所以应该尽可能避免。如果你一定要提供自动播放功能,你应该加入开关(让用户主动打开自动播放)。然而,如果需要创建一些媒体元素,其播放源由用户在稍后设置,自动播放就会很有用。想了解如果正确使用自动播放,可参见我们的自动播放指南

{{htmlattrdef("controls")}}
如果声明了该属性,浏览器将提供一个包含声音,播放进度,播放暂停的控制面板,让用户可以控制音频的播放。
{{htmlattrdef("crossorigin")}}
-
枚举属性  展示音频资源是否可以通过CORS加载。支持CORS的资源  可以被 {{HTMLElement("canvas")}} 元素复用而不污染. 可选值如下: +
枚举属性  展示音频资源是否可以通过CORS加载。支持CORS的资源  可以被 {{HTMLElement("canvas")}} 元素复用而不污染. 可选值如下:
anonymous
在发送跨域请求时不携带验证信息。换句话说,浏览器在发送Origin: HTTP 请求首部时将不携带 cookie、 X.509 安全令牌、也不会执行任何 HTTP 基本认证。如果服务器没有给予源站信任(也就是说没有设置 Access-Control-Allow-Origin: 响应首部),那么图片就被认为是污染的,它就会被限制使用。
use-credentials
在发送跨域请求时不携带验证信息。换句话说,在发送Origin: HTTP 请求首部时将携带 cookie、安全令牌、并且执行 HTTP 基本认证。如果服务器没有给予源站信任(通过设置Access-Control-Allow-Credentials: 响应首部)那么图片就被认为是污染的,它就会被限制使用。
- 在未指定时,资源将不通过 CORS 请求来获取(也就是不发送 Origin: 请求首部),以保护 {{HTMLElement('canvas')}}  元素中未污染的内容。如果验证失败,它会表现的好像 anonymous 选项是选中的。查看 CORS settings attributes 来获取更多信息。
+ 在未指定时,资源将不通过 CORS 请求来获取(也就是不发送 Origin: 请求首部),以保护 {{HTMLElement('canvas')}}  元素中未污染的内容。如果验证失败,它会表现的好像 anonymous 选项是选中的。查看 CORS settings attributes 来获取更多信息。
{{htmlattrdef("currentTime")}}

读取 currentTime 属性将返回一个双精度浮点值,用以标明以秒为单位的当前音频的播放位置。如果音频的元数据暂时无法访问——这意味着你无法的知道媒体的开始或持续时间。这时,currentTime 相对应的,能够被用于改变重播的时间。否则,设置 currentTime 将设置当前的播放位置,并且会自动搜寻到媒体的那个位置,如果媒体目前已经被加载的话。

@@ -54,7 +54,7 @@ translation_of: Web/HTML/Element/audio
{{htmlattrdef("duration")}} {{ReadOnlyInline}}
-
这是一个双精度浮点数,指明了音频在时间轴中的持续时间(总长度),以秒为单位。如果元素上没有媒体,或者媒体是不可用的,那么会返回 NaN。如果媒体找不到确切的结尾(比如不确定长度的直播流,网络电台,或者是通过 WebRTC 连接的流),那么这个值将返回 +Infinity
+
这是一个双精度浮点数,指明了音频在时间轴中的持续时间(总长度),以秒为单位。如果元素上没有媒体,或者媒体是不可用的,那么会返回 NaN。如果媒体找不到确切的结尾(比如不确定长度的直播流,网络电台,或者是通过 WebRTC 连接的流),那么这个值将返回 +Infinity
{{htmlattrdef("loop")}}
布尔属性;如果声明该属性,将循环播放音频。
{{htmlattrdef("muted")}}
@@ -120,7 +120,7 @@ translation_of: Web/HTML/Element/audio {{domxref("HTMLMediaElement.emptied_event", 'emptied')}} -

媒体置空。举个例子,当一个媒体已经加载(或部分加载)的情况下话调用 load() 方法,这个事件就将被触发。

+

媒体置空。举个例子,当一个媒体已经加载(或部分加载)的情况下话调用 load() 方法,这个事件就将被触发。

@@ -200,7 +200,7 @@ translation_of: Web/HTML/Element/audio

使用说明

-

浏览器对 文件类型 和 音频编码 的支持各有不同,你可以使用内嵌的 {{htmlelement("source")}} 元素提供不同的播放源。浏览器会使用第一个它支持的播放源:

+

浏览器对 文件类型 和 音频编码 的支持各有不同,你可以使用内嵌的 {{htmlelement("source")}} 元素提供不同的播放源。浏览器会使用第一个它支持的播放源:

<audio controls>
   <source src="myAudio.mp3" type="audio/mpeg">
@@ -209,18 +209,18 @@ translation_of: Web/HTML/Element/audio
      a <a href="myAudio.mp4">link to the audio</a> instead.</p>
 </audio>
-

我们提供了全面细致的 音频文件类型指南 和 这些类型可以使用的音频编码。此外,还有 视频编码支持指南

+

我们提供了全面细致的 音频文件类型指南 和 这些类型可以使用的音频编码。此外,还有 视频编码支持指南

其他使用说明:

-

视频和音频内容 新手教程是一篇关于使用 HTML <audio> 的好文章。

+

视频和音频内容 新手教程是一篇关于使用 HTML <audio> 的好文章。

使用 CSS 设置样式

@@ -232,7 +232,7 @@ translation_of: Web/HTML/Element/audio

如果在跨浏览器中得到一致的外观和体验,你需要创建自定义控件;自定义控件可以根据你的需求任意设置样式,还可以使用 JavaScript 和 {{domxref("HTMLMediaElement")}} API 来设置更多功能。

-

视频播放器样式基础 提供了一些有用的样式技术,这篇文章围绕 <video> 而写,但大部分都可以用于 <audio>

+

视频播放器样式基础 提供了一些有用的样式技术,这篇文章围绕 <video> 而写,但大部分都可以用于 <audio>

检测音轨添加和移除

@@ -282,7 +282,7 @@ elem.audioTrackList.onremovetrack = function(event) { </audio> -

如果想获得更多信息,包括何时自动播放生效,如何获取自动播放权限,并且通过何种方式,在何时应用自动播放才是合适的,请看我们的 autoplay guide

+

如果想获得更多信息,包括何时自动播放生效,如何获取自动播放权限,并且通过何种方式,在何时应用自动播放才是合适的,请看我们的 autoplay guide

<audio> 元素与 <source> 元素

@@ -306,7 +306,7 @@ elem.audioTrackList.onremovetrack = function(event) {

可访问性考虑

-

语音形式的音频必须同时提供标题,以及确切描述其内容的文本。标题(Captions)是由 WebVTT 标准定义的,允许听力障碍的人群能够通过播放(文字)记录来理解音频内容。转录文字允许那些需要额外时间的人们,以适合他们的速度和格式回顾记录的内容。

+

语音形式的音频必须同时提供标题,以及确切描述其内容的文本。标题(Captions)是由 WebVTT 标准定义的,允许听力障碍的人群能够通过播放(文字)记录来理解音频内容。转录文字允许那些需要额外时间的人们,以适合他们的速度和格式回顾记录的内容。

如果使用自动标题服务,人工检查生成内容是很重要的,这确保了标题能够准确的描述源音频。

@@ -342,10 +342,10 @@ Welcome to the Time Keeper's podcast! In this episode we're discussing which Swi @@ -355,8 +355,8 @@ Welcome to the Time Keeper's podcast! In this episode we're discussing which Swi - - + + @@ -421,17 +421,17 @@ Welcome to the Time Keeper's podcast! In this episode we're discussing which Swi

参见

diff --git a/files/zh-cn/web/html/element/fieldset/index.html b/files/zh-cn/web/html/element/fieldset/index.html index 3da899a141..7eda6a559a 100644 --- a/files/zh-cn/web/html/element/fieldset/index.html +++ b/files/zh-cn/web/html/element/fieldset/index.html @@ -39,7 +39,7 @@ translation_of: Web/HTML/Element/fieldset

<fieldset> 有几种特别的样式方案。

-

它的 {{cssxref("display")}} 值默认为 block,因此建立了一个块级格式化上下文。如果将 <fieldset> 的 display 值设置为行内级别,则会表现为 inline-block,否则会表现为 block。默认情况下 <fieldset> 会有 2px groove 的边界围绕着内容,还有一个默认的小的内边距,还有 {{cssxref("min-inline-size", "min-inline-size: min-content")}} 。

+

它的 {{cssxref("display")}} 值默认为 block,因此建立了一个块级格式化上下文。如果将 <fieldset> 的 display 值设置为行内级别,则会表现为 inline-block,否则会表现为 block。默认情况下 <fieldset> 会有 2px groove 的边界围绕着内容,还有一个默认的小的内边距,还有 {{cssxref("min-inline-size", "min-inline-size: min-content")}} 。

如果其中有 {{htmlelement("legend")}} 元素,会放在块级框起始处的边界上。<legend> 的宽度会根据内容尽量收缩(shrink-wrap),同时也建立了一个格式化上下文。display 值会块级化(例如  display: inline 表现为 block)。

@@ -48,7 +48,7 @@ translation_of: Web/HTML/Element/fieldset

你可以以任意方式自行设置 <fieldset> 和 <legend> 的样式以配合你的页面设计。

-

注意:截至这篇文章发出为止,Microsoft Edge 和 Google Chrome 不能在 {{HTMLElement("fieldset")}} 中使用 flexbox 和 grid 布局。这个 GitHub issue 跟踪了这个bug。

+

注意:截至这篇文章发出为止,Microsoft Edge 和 Google Chrome 不能在 {{HTMLElement("fieldset")}} 中使用 flexbox 和 grid 布局。这个 GitHub issue 跟踪了这个bug。

示例

@@ -92,8 +92,8 @@ translation_of: Web/HTML/Element/fieldset
Content categoriesFlow content, phrasing content, embedded content. If it has a {{htmlattrxref("controls", "audio")}} attribute: interactive content and palpable content.Content categoriesFlow content, phrasing content, embedded content. If it has a {{htmlattrxref("controls", "audio")}} attribute: interactive content and palpable content.
合法内容
- - + + @@ -105,7 +105,7 @@ translation_of: Web/HTML/Element/fieldset - + diff --git a/files/zh-cn/web/html/element/form/index.html b/files/zh-cn/web/html/element/form/index.html index 14308b9497..c25d741f14 100644 --- a/files/zh-cn/web/html/element/form/index.html +++ b/files/zh-cn/web/html/element/form/index.html @@ -41,11 +41,11 @@ translation_of: Web/HTML/Element/form - + - + @@ -78,7 +78,7 @@ translation_of: Web/HTML/Element/form
{{htmlattrdef("autocomplete")}}
用于指示 input 元素是否能够拥有一个默认值,此默认值是由浏览器自动补全的。此设定可以被属于此表单的子元素的 autocomplete 属性覆盖。 可能的值有: @@ -87,7 +87,7 @@ translation_of: Web/HTML/Element/form
{{htmlattrdef("name")}}
表单的名称。HTML 4中不推荐(应使用 id)。在 HTML 5 中,该值必须是所有表单中独一无二的,而且不能是空字符串。
{{htmlattrdef("rel")}}
-
根据 value 创建一个超链接或Creates a hyperlink or annotation depending on the value, see the {{htmlattrdef("rel")}} attribute for details.
+
根据 value 创建一个超链接或Creates a hyperlink or annotation depending on the value, see the {{htmlattrdef("rel")}} attribute for details.

关于提交表单的属性

@@ -96,7 +96,7 @@ translation_of: Web/HTML/Element/form
{{htmlattrdef("action")}}
-
处理表单提交的 URL。这个值可被 {{HTMLElement("button")}}、<input type="submit"> 或 <input type="image"> 元素上的 {{htmlattrxref("formaction", "button")}} 属性覆盖。
+
处理表单提交的 URL。这个值可被 {{HTMLElement("button")}}、<input type="submit"> 或 <input type="image"> 元素上的 {{htmlattrxref("formaction", "button")}} 属性覆盖。
@@ -108,13 +108,13 @@ translation_of: Web/HTML/Element/form
  • text/plain:出现于 HTML5,用于调试。
  • -

    这个值可被 {{HTMLElement("button")}}、<input type="submit"> 或 <input type="image"> 元素上的 {{htmlattrxref("formaction", "button")}} 属性覆盖。

    +

    这个值可被 {{HTMLElement("button")}}、<input type="submit"> 或 <input type="image"> 元素上的 {{htmlattrxref("formaction", "button")}} 属性覆盖。

    {{htmlattrdef("method")}}
    浏览器使用这种 HTTP 方式来提交 表单. 可能的值有:
    • post:指的是 HTTP POST 方法;表单数据会包含在表单体内然后发送给服务器.
    • -
    • get:指的是 HTTP GET 方法;表单数据会附加在 action 属性的 URL 中,并以 '?' 作为分隔符,没有副作用 时使用这个方法。
    • +
    • get:指的是 HTTP GET 方法;表单数据会附加在 action 属性的 URL 中,并以 '?' 作为分隔符,没有副作用 时使用这个方法。
    • dialog:如果表单在 {{HTMLElement("dialog")}} 元素中,提交时关闭对话框。
    diff --git a/files/zh-cn/web/html/element/hgroup/index.html b/files/zh-cn/web/html/element/hgroup/index.html index 99a782ad8c..fe8045aad3 100644 --- a/files/zh-cn/web/html/element/hgroup/index.html +++ b/files/zh-cn/web/html/element/hgroup/index.html @@ -66,9 +66,9 @@ translation_of: Web/HTML/Element/hgroup

    The <hgroup> element allows the primary heading for a document section to be grouped with any secondary headings—such as subheadings or alternative titles—to form a multi-level heading.

    -

    In other words, the <hgroup> element prevents any of its secondary <h1>–<h6> children from creating separate sections of their own in the outline—as those <h1>–<h6> elements otherwise normally would if they were not children of any <hgroup>.

    +

    In other words, the <hgroup> element prevents any of its secondary <h1>–<h6> children from creating separate sections of their own in the outline—as those <h1>–<h6> elements otherwise normally would if they were not children of any <hgroup>.

    -

    So in the abstract outline produced by the HTML outline algorithm defined in the HTML specification, the <hgroup> as a whole forms a single logical heading, with the entire set of <h1>–<h6> children of the <hgroup> going into the outline as one multi-level unit, to comprise that single logical heading in the abstract outline.

    +

    So in the abstract outline produced by the HTML outline algorithm defined in the HTML specification, the <hgroup> as a whole forms a single logical heading, with the entire set of <h1>–<h6> children of the <hgroup> going into the outline as one multi-level unit, to comprise that single logical heading in the abstract outline.

    To produce any (non-abstract) rendered view of such an outline, some choice must be made in the design of the rendering tool about how to render <hgroup> headings in such a way as to convey their multi-level nature. There are a variety of ways an <hgroup> might be shown in a rendered outline; for example:

    diff --git a/files/zh-cn/web/html/element/input/hidden/index.html b/files/zh-cn/web/html/element/input/hidden/index.html index 7f87b5441d..a1ed459082 100644 --- a/files/zh-cn/web/html/element/input/hidden/index.html +++ b/files/zh-cn/web/html/element/input/hidden/index.html @@ -107,7 +107,7 @@ translation_of: Web/HTML/Element/input/hidden

    隐藏输入表单还用于存储和提交安全令牌或机密信息,以提高网站的安全性。基本思路是,如果用户填写敏感表格,例如在其银行网站上将某笔款项转入另一个帐户的表格,他们将被提供的密钥和证明他们就是他们所说的真实身份,并且他们使用正确的表单来提交转移请求。

    -

    这将阻止恶意用户创建伪造的表单,伪装成银行,然后通过电子邮件将表单发送给毫无戒备心的用户,以诱骗他们将钱转入错误的位置。 这种攻击称为跨站点请求伪造(CSRF);几乎任何信誉良好的服务器端框架都使用隐藏机密来防止此类攻击。

    +

    这将阻止恶意用户创建伪造的表单,伪装成银行,然后通过电子邮件将表单发送给毫无戒备心的用户,以诱骗他们将钱转入错误的位置。 这种攻击称为跨站点请求伪造(CSRF);几乎任何信誉良好的服务器端框架都使用隐藏机密来防止此类攻击。

    如前所述,将密钥放置在隐藏的输入中并不能使其固有安全性。 密钥的组成和编码已经可以做到这一点。隐藏输入的值是保持它与数据关联性,并在将表单发送到服务器时自动将其包含在内。 您需要使用精心设计的密钥来真正保护您的网站。

    diff --git a/files/zh-cn/web/html/element/input/index.html b/files/zh-cn/web/html/element/input/index.html index f0f61c5d8f..3efd79c60f 100644 --- a/files/zh-cn/web/html/element/input/index.html +++ b/files/zh-cn/web/html/element/input/index.html @@ -300,7 +300,7 @@ translation_of: Web/HTML/Element/input
    内容目录Flow contentsectioning rootlistedform-associated element, palpable content.内容目录Flow contentsectioning rootlistedform-associated element, palpable content.
    允许的内容
    允许的父元素Any element that accepts flow content.Any element that accepts flow content.
    默认 ARIA role
    Implicit ARIA roleform if the form has an accessible name, otherwise no corresponding roleform if the form has an accessible name, otherwise no corresponding role
    Permitted ARIA rolessearch, {{ARIARole("group")}}, {{ARIARole("presentation")}}search, {{ARIARole("group")}}, {{ARIARole("presentation")}}
    DOM 接口
    -

    {{htmlelement('input')}}元素的属性包括全局HTML属性和以下属性:

    +

    {{htmlelement('input')}}元素的属性包括全局HTML属性和以下属性:

    @@ -434,12 +434,12 @@ translation_of: Web/HTML/Element/input - + - + @@ -556,7 +556,7 @@ translation_of: Web/HTML/Element/input
    {{ htmlattrdef("checked") }}
    如果该元素的type属性的值为radio或者checkbox,则该布尔属性的存在与否表明了该控件是否是默认选择状态。 -

    If present on a checkbox type, it indicates that the checkbox is checked by default (when the page loads). It does not indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change. (Only the HTMLInputElement’s checked IDL attribute is updated.)

    +

    If present on a checkbox type, it indicates that the checkbox is checked by default (when the page loads). It does not indicate whether this checkbox is currently checked: if the checkbox’s state is changed, this content attribute does not reflect the change. (Only the HTMLInputElement’s checked IDL attribute is updated.)

    Note: Unlike other input controls, a checkboxes and radio buttons value are only included in the submitted data if they are currently checked. If they are, the name and the value(s) of the checked controls are submitted.

    @@ -672,7 +672,7 @@ translation_of: Web/HTML/Element/input

    Per the specifications, the list attribute is not supported by the hiddenpasswordcheckboxradiofile, or any of the button types.

    -

    Depending on the browser, the user may see a custom color palette suggested, tic marks along a range, or even a input that opens like a select but allows for non-listed values. Check out the browser compatibility table for the other input types.

    +

    Depending on the browser, the user may see a custom color palette suggested, tic marks along a range, or even a input that opens like a select but allows for non-listed values. Check out the browser compatibility table for the other input types.

    See the {{htmlelement('datalist')}} element.

    @@ -687,7 +687,7 @@ translation_of: Web/HTML/Element/input

    Valid for textsearchurltelemail, and password, it defines the minimum number of characters (as UTF-16 code units) the user can enter into the entry field. This must be an non-negative integer value smaller than or equal to the value specified by maxlength. If no minlength is specified, or an invalid value is specified, the input has no minimum length.

    -

    The input will fail constraint validation if the length of the text entered into the field is fewer than minlength UTF-16 code units long, preventing form submission. See {{anch("Client-side validation")}} for more information.

    +

    The input will fail constraint validation if the length of the text entered into the field is fewer than minlength UTF-16 code units long, preventing form submission. See {{anch("Client-side validation")}} for more information.

    {{ htmlattrdef("multiple") }}{{ HTMLVersionInline(5) }}
    This Boolean attribute indicates whether the user can enter more than one value.这个属性指示用户能否输入多个值。这个属性仅在type属性为email或file的时候生效 ; 否则被忽视.
    @@ -820,7 +820,7 @@ translation_of: Web/HTML/Element/input - + diff --git a/files/zh-cn/web/html/element/input/reset/index.html b/files/zh-cn/web/html/element/input/reset/index.html index 5af6fbd48b..e24d084a31 100644 --- a/files/zh-cn/web/html/element/input/reset/index.html +++ b/files/zh-cn/web/html/element/input/reset/index.html @@ -19,7 +19,7 @@ translation_of: Web/HTML/Element/input/reset
    -

    您通常应该尽量避免在表单中包含重置按钮。 它们很少有实用性,事实上更有可能使用户误点而感到沮丧(通常是在尝试单击“提交”按钮时)。

    +

    您通常应该尽量避免在表单中包含重置按钮。 它们很少有实用性,事实上更有可能使用户误点而感到沮丧(通常是在尝试单击“提交”按钮时)。

    当表单控件为空时,控件中显示的内容
    readonlyreadonly 绝大部分 布尔值。存在时表示控件的值不可编辑
    requiredrequired 绝大部分 布尔值。表示此值为必填项或者提交表单前必须先检查该值
    :placeholder-shownElement that is currently displaying placeholder text, including input elements with the placeholder attribute present that has, as of yet, no value.Element that is currently displaying placeholder text, including input elements with the placeholder attribute present that has, as of yet, no value.
    :default
    @@ -67,7 +67,7 @@ translation_of: Web/HTML/Element/input/reset

    使用重置按钮

    -

    <input type =“ reset”> 按钮用于重置表单。 如果您要创建自定义按钮,则使用JavaScript自定义行为,您需要使用 <input type="button">,或者最好使用 {{htmlelement("button")}} 元素。

    +

    <input type =“ reset”> 按钮用于重置表单。 如果您要创建自定义按钮,则使用JavaScript自定义行为,您需要使用 <input type="button">,或者最好使用 {{htmlelement("button")}} 元素。

    一个简单的重置按钮

    diff --git a/files/zh-cn/web/html/element/input/search/index.html b/files/zh-cn/web/html/element/input/search/index.html index 800971c9c1..64afa2ba8d 100644 --- a/files/zh-cn/web/html/element/input/search/index.html +++ b/files/zh-cn/web/html/element/input/search/index.html @@ -469,5 +469,5 @@ input:valid ~ span:after {
  • HTML 表单
  • {{HTMLElement("input")}} 及其所基于的接口 {{domxref("HTMLInputElement")}} 
  • <input type="text">
  • -
  • CSS 属性的兼容性
  • +
  • CSS 属性的兼容性
  • diff --git a/files/zh-cn/web/html/element/link/index.html b/files/zh-cn/web/html/element/link/index.html index 786ecb0e16..e2b2038e43 100644 --- a/files/zh-cn/web/html/element/link/index.html +++ b/files/zh-cn/web/html/element/link/index.html @@ -198,7 +198,7 @@ translation_of: Web/HTML/Element/link
    {{HTMLAttrDef("title")}}
    -
    属性在<link>元素上有特殊的语义。当用于<link rel="stylesheet">时,它定义了一个首选样式表或备用样式表。不正确地使用它可能会导致样式表被忽略
    +
    属性在<link>元素上有特殊的语义。当用于<link rel="stylesheet">时,它定义了一个首选样式表或备用样式表。不正确地使用它可能会导致样式表被忽略
    {{htmlattrdef("type")}}
    这个属性被用于定义链接的内容的类型。这个属性的值应该是像text/html,text/css等MIME类型。这个属性常用的用法是定义链接的样式表,最常用的值是表明了CSS的text/css。
    @@ -221,7 +221,7 @@ translation_of: Web/HTML/Element/link
    {{htmlattrdef("rev")}}{{obsolete_inline}}
    -
    此属性的值显示了 {{HTMLAttrxRef("href", "link")}} 属性所定义的当前文档与链接文档的关系。 因此,该属性定义了与rel属性的值相比的反向关系。 该属性的Link type value类似于{{HTMLAttrxRef("rel", "link")}}的可能值。
    +
    此属性的值显示了 {{HTMLAttrxRef("href", "link")}} 属性所定义的当前文档与链接文档的关系。 因此,该属性定义了与rel属性的值相比的反向关系。 该属性的Link type value类似于{{HTMLAttrxRef("rel", "link")}}的可能值。

    Note: WHATWG HTML生活标准(MDN将其视为规范的规范)认为该属性已过时。 但是,值得注意的是,rev在W3C规范中并未过时。 就是说,鉴于不确定性,依靠rev是不明智的。

    diff --git a/files/zh-cn/web/html/element/meta/index.html b/files/zh-cn/web/html/element/meta/index.html index 4594e71125..ed6d77bafb 100644 --- a/files/zh-cn/web/html/element/meta/index.html +++ b/files/zh-cn/web/html/element/meta/index.html @@ -53,7 +53,7 @@ translation_of: Web/HTML/Element/meta
  • content-security-policy
    它允许页面作者定义当前页的内容策略。 内容策略主要指定允许的服务器源和脚本端点,这有助于防止跨站点脚本攻击。
  • content-type
    - 如果使用这个属性,其值必须是"text/html; charset=utf-8"。注意:该属性只能用于 MIME typetext/html 的文档,不能用于MIME类型为XML的文档。
  • + 如果使用这个属性,其值必须是"text/html; charset=utf-8"。注意:该属性只能用于 MIME typetext/html 的文档,不能用于MIME类型为XML的文档。
  • default-style

    设置默认 CSS 样式表组的名称。

  • @@ -75,8 +75,8 @@ translation_of: Web/HTML/Element/meta

    设置了 refresh 值的页面可能有时间间隔太短的风险。使用诸如屏幕朗读这样的辅助技术来浏览网页的人可能会由于自动跳转而来不及读完或理解网页的内容。这样不经提示而突然进行的页面刷新也可能会让有视力障碍的人群感到迷惑。

    {{htmlattrdef("name")}}
    namecontent 属性可以一起使用,以名-值对的方式给文档提供元数据,其中 name 作为元数据的名称,content 作为元数据的值。
    -
    标准元数据名称中查看 HTML 规范等规范中定义的标准元数据名称。
    +
    标准元数据名称中查看 HTML 规范等规范中定义的标准元数据名称。

    示例

    diff --git a/files/zh-cn/web/html/element/progress/index.html b/files/zh-cn/web/html/element/progress/index.html index aba8a6466f..6d14b6890e 100644 --- a/files/zh-cn/web/html/element/progress/index.html +++ b/files/zh-cn/web/html/element/progress/index.html @@ -15,16 +15,16 @@ translation_of: Web/HTML/Element/progress

    使用上下文

    -
    使用策略                流文本(Flow content), 短文本(phrasing content)
    -Content categories     可标记内容,可触摸内容
    +
    使用策略                流文本(Flow content), 短文本(phrasing content)
    +Content categories     可标记内容,可触摸内容
     
    -有效内容                Phrasing content, 其中在它的后代中不能包含
    +有效内容                Phrasing content, 其中在它的后代中不能包含
     Permitted content      <progress>元素.
     
     标签省略                不可以,{{no_tag_omission}}
     Tag omission
     
    -有效的父元素             任何可以包裹短文本(phrasing content)的元素.
    +有效的父元素             任何可以包裹短文本(phrasing content)的元素.
     
     隐式元素                {{ARIARole("progressbar")}}
     ARIA role
    diff --git a/files/zh-cn/web/html/element/script/index.html b/files/zh-cn/web/html/element/script/index.html
    index 047dcfc899..11a899ea1d 100644
    --- a/files/zh-cn/web/html/element/script/index.html
    +++ b/files/zh-cn/web/html/element/script/index.html
    @@ -10,7 +10,7 @@ tags:
       - 网络
     translation_of: Web/HTML/Element/script
     ---
    -
    HTML <script> 元素用于嵌入或引用可执行脚本。这通常用作嵌入或者指向 JavaScript 代码。<script> 元素也能在其他语言中使用,比如 WebGL 的 GLSL 着色器语言。
    +
    HTML <script> 元素用于嵌入或引用可执行脚本。这通常用作嵌入或者指向 JavaScript 代码。<script> 元素也能在其他语言中使用,比如 WebGL 的 GLSL 着色器语言。
    @@ -53,7 +53,7 @@ translation_of: Web/HTML/Element/script
    对于普通脚本,如果存在 async 属性,那么普通脚本会被并行请求,并尽快解析和执行。
    -
    对于模块脚本,如果存在 async 属性,那么脚本及其所有依赖都会在延缓队列中执行,因此它们会被并行请求,并尽快解析和执行。
    +
    对于模块脚本,如果存在 async 属性,那么脚本及其所有依赖都会在延缓队列中执行,因此它们会被并行请求,并尽快解析和执行。
    该属性能够消除解析阻塞的 Javascript。解析阻塞的 Javascript 会导致浏览器必须加载并且执行脚本,之后才能继续解析。defer 在这一点上也有类似的作用。
    这是个布尔属性:布尔属性的存在意味着 true 值,布尔属性的缺失意味着 false 值。
    关于浏览器支持请参见{{anch("浏览器兼容性")}}。另可参见文章asm.js的异步脚本
    diff --git a/files/zh-cn/web/html/element/select/index.html b/files/zh-cn/web/html/element/select/index.html index fa0d3e3cfa..57f094a833 100644 --- a/files/zh-cn/web/html/element/select/index.html +++ b/files/zh-cn/web/html/element/select/index.html @@ -24,7 +24,7 @@ translation_of: Web/HTML/Element/select

    你还可以将 <option> 元素放在 {{htmlelement("optgroup")}} 元素中以为下拉菜单创建不同的选项分组。

    -

    在 原生表单部件 中查看更多示例。

    +

    在 原生表单部件 中查看更多示例。

    属性

    @@ -87,9 +87,9 @@ translation_of: Web/HTML/Element/select

    应用 CSS 样式

    -

    众所周知,<select>元素很难用 CSS 进行高效的设计。你可以像其他元素一样改变某些方面——例如,调整 盒模型显示的字体 等,你还可以使用 {{cssxref("appearance")}} 属性来去除默认的系统外观。

    +

    众所周知,<select>元素很难用 CSS 进行高效的设计。你可以像其他元素一样改变某些方面——例如,调整 盒模型显示的字体 等,你还可以使用 {{cssxref("appearance")}} 属性来去除默认的系统外观。

    -

    但是,这些属性的表现在不同浏览器之间并不一致,而且有些事情难以很好地处理,例如在一列中顺序排列不同类型的表单元素。 <select>元素的内部结构复杂,难以控制。 如果你想完全控制,你应该考虑使用一个在修改表单部件样式方面拥有强大能力的库,或者尝试使用非语义元素和 JavaScript 来制作下拉菜单,再使用 WAI-ARIA 来提供语义。

    +

    但是,这些属性的表现在不同浏览器之间并不一致,而且有些事情难以很好地处理,例如在一列中顺序排列不同类型的表单元素。 <select>元素的内部结构复杂,难以控制。 如果你想完全控制,你应该考虑使用一个在修改表单部件样式方面拥有强大能力的库,或者尝试使用非语义元素和 JavaScript 来制作下拉菜单,再使用 WAI-ARIA 来提供语义。

    有关样式<select>的更多有用信息,请参阅:

    @@ -150,8 +150,8 @@ translation_of: Web/HTML/Element/select
    - - + + @@ -163,7 +163,7 @@ translation_of: Web/HTML/Element/select - + diff --git a/files/zh-cn/web/html/element/style/index.html b/files/zh-cn/web/html/element/style/index.html index 7542db4262..dfc2f7c41a 100644 --- a/files/zh-cn/web/html/element/style/index.html +++ b/files/zh-cn/web/html/element/style/index.html @@ -35,7 +35,7 @@ translation_of: Web/HTML/Element/style

    {{htmlattrdef("nonce")}}

    -
    一种加密的随机数(一次使用的数字),用于在style-src Content-Security-Policy中将内联样式列入白名单。 服务器每次发送策略时都必须生成一个唯一的随机数值。 提供一个无法猜测的随机数非常重要,因为绕开资源策略是微不足道的。
    +
    一种加密的随机数(一次使用的数字),用于在style-src Content-Security-Policy中将内联样式列入白名单。 服务器每次发送策略时都必须生成一个唯一的随机数值。 提供一个无法猜测的随机数非常重要,因为绕开资源策略是微不足道的。
    {{htmlattrdef("title")}}
    指定可选的样式表。
    @@ -170,5 +170,5 @@ translation_of: Web/HTML/Element/style diff --git a/files/zh-cn/web/html/element/textarea/index.html b/files/zh-cn/web/html/element/textarea/index.html index 0416c01444..a9bd73acc7 100644 --- a/files/zh-cn/web/html/element/textarea/index.html +++ b/files/zh-cn/web/html/element/textarea/index.html @@ -97,7 +97,7 @@ translation_of: Web/HTML/Element/textarea

    <textarea>可被替换的元素——其有自己的固有尺寸,像。默认情况下,其 {{cssxref("display")}} 值为 block。与其他表单元素相比,这个元素相对比较容易设置样式,使用常规的 CSS 就可以轻松设置它的盒模型、字体、颜色方案等。

    -

    Styling HTML forms 这个页面提供了一些关于 <textarea> 样式的有用提示。

    +

    Styling HTML forms 这个页面提供了一些关于 <textarea> 样式的有用提示。

    基线不一致

    @@ -190,8 +190,8 @@ textarea:valid {
    内容分类Flow contentphrasing contentinteractive contentlistedlabelableresettable, and submittable form-associated element内容分类Flow contentphrasing contentinteractive contentlistedlabelableresettable, and submittable form-associated element
    允许的内容
    允许的父元素Any element that accepts phrasing content.Any element that accepts phrasing content.
    Implicit ARIA role
    - - + + @@ -203,11 +203,11 @@ textarea:valid { - + - + diff --git a/files/zh-cn/web/html/element/video/index.html b/files/zh-cn/web/html/element/video/index.html index 83925c0882..350d9e4e41 100644 --- a/files/zh-cn/web/html/element/video/index.html +++ b/files/zh-cn/web/html/element/video/index.html @@ -214,7 +214,7 @@ translation_of: Web/HTML/Element/video - + diff --git a/files/zh-cn/web/html/global_attributes/data-_star_/index.html b/files/zh-cn/web/html/global_attributes/data-_star_/index.html index 59113524be..ed5adaae8f 100644 --- a/files/zh-cn/web/html/global_attributes/data-_star_/index.html +++ b/files/zh-cn/web/html/global_attributes/data-_star_/index.html @@ -8,7 +8,7 @@ translation_of: Web/HTML/Global_attributes/data-* ---

    {{HTMLSidebar("Global_attributes")}}

    -

    data-* 全局属性 是一类被称为自定义数据属性的属性,它赋予我们在所有 HTML 元素上嵌入自定义数据属性的能力,并可以通过脚本在 HTML 与 DOM 表现之间进行专有数据的交换。

    +

    data-* 全局属性 是一类被称为自定义数据属性的属性,它赋予我们在所有 HTML 元素上嵌入自定义数据属性的能力,并可以通过脚本在 HTML 与 DOM 表现之间进行专有数据的交换。

    {{EmbedInteractiveExample("pages/tabbed/attribute-data.html","tabbed-standard")}}
    diff --git a/files/zh-cn/web/html/global_attributes/hidden/index.html b/files/zh-cn/web/html/global_attributes/hidden/index.html index 507318c483..e7f9d451f0 100644 --- a/files/zh-cn/web/html/global_attributes/hidden/index.html +++ b/files/zh-cn/web/html/global_attributes/hidden/index.html @@ -104,5 +104,5 @@ translation_of: Web/HTML/Global_attributes/hidden -- cgit v1.2.3-54-g00ecf
    Content categoriesFlow contentphrasing contentInteractive contentlistedlabelableresettable, and submittable form-associated element.Content categoriesFlow contentphrasing contentInteractive contentlistedlabelableresettable, and submittable form-associated element.
    Permitted content
    Permitted parentsAny element that accepts phrasing content.Any element that accepts phrasing content.
    Implicit ARIA roletextboxtextbox
    Permitted ARIA roles
    {{domxref("HTMLMediaElement.emptied_event", 'emptied')}}媒体内容为空;例如,当这个media已经加载完成(或者部分加载完成), load() 被用来进行重新加载。媒体内容为空;例如,当这个media已经加载完成(或者部分加载完成), load() 被用来进行重新加载。
    {{domxref("HTMLMediaElement.ended_event", 'ended')}}