From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/html/element/blockquote/index.html | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 files/zh-cn/web/html/element/blockquote/index.html (limited to 'files/zh-cn/web/html/element/blockquote') diff --git a/files/zh-cn/web/html/element/blockquote/index.html b/files/zh-cn/web/html/element/blockquote/index.html new file mode 100644 index 0000000000..4bd40652b7 --- /dev/null +++ b/files/zh-cn/web/html/element/blockquote/index.html @@ -0,0 +1,127 @@ +--- +title:
:块级引用元素 +slug: Web/HTML/Element/blockquote +tags: + - Blockquote + - 元素 + - 块级引用 + - 引用 +translation_of: Web/HTML/Element/blockquote +--- +
{{HTMLRef}}
+ +

HTML <blockquote> 元素(或者 HTML 块级引用元素),代表其中的文字是引用内容。通常在渲染时,这部分的内容会有一定的缩进( 中说明了如何更改)。若引文来源于网络,则可以将原内容的出处 URL 地址设置到 cite 特性上,若要以文本的形式告知读者引文的出处时,可以通过 {{HTMLElement("cite")}} 元素。

+ +
{{EmbedInteractiveExample("pages/tabbed/blockquote.html","tabbed-standard")}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Content categoriesFlow content, sectioning root, palpable content.
Permitted contentFlow content.
Tag omission{{no_tag_omission}}
Permitted parentsAny element that accepts flow content.
Permitted ARIA rolesAny
DOM interface{{domxref("HTMLQuoteElement")}}
+ +

属性

+ +

此元素的属性包含 全局属性

+ +
+
{{htmlattrdef("cite")}}
+
是一个标注引用的信息的来源文档或者相关信息的URL。通常用来描述能够解释引文的上下文或者引用的信息。
+
+ + +

使用备注

+ +

若要修改被引用内容的缩进距离,可以使用 {{Glossary("CSS")}} {{cssxref("margin-left")}} 和/或 {{cssxref("margin-right")}} 属性,或使用 {{cssxref("margin")}} 缩写属性。

+ +

若想使用在行内引用较短的内容而非创建一个单独的引用块,可使用 {{HTMLElement("q")}}(Quotation)元素。

+ +

如果想要使用短引用(行间引用),可以使用{{HTMLElement("q")}} 标签。

+ +

例子

+ +

下面的这个例子演示了使用 <blockquote> 元素引用一段来自 {{RFC(1149)}} 的内容,以禽类作为载体的IP 数据包传输标准。

+ +
<blockquote cite="https://tools.ietf.org/html/rfc1149">
+  <p>Avian carriers can provide high delay, low
+  throughput, and low altitude service.  The
+  connection topology is limited to a single
+  point-to-point path for each carrier, used with
+  standard carriers, but many carriers can be used
+  without significant interference with each other,
+  outside of early spring.  This is because of the 3D
+  ether space available to the carriers, in contrast
+  to the 1D ether used by IEEE802.3.  The carriers
+  have an intrinsic collision avoidance system, which
+  increases availability.</p>
+</blockquote>
+
+ +

上面的HTML代码将会生成:

+ +

{{EmbedLiveSample("Example", 640, 180)}}

+ +

规范

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName('HTML WHATWG', 'grouping-content.html#the-blockquote-element', '<blockquote>')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5 W3C', 'grouping-content.html#the-blockquote-element', '<blockquote>')}}{{Spec2('HTML5 W3C')}}
{{SpecName('HTML4.01', 'struct/text.html#h-9.2.2', '<blockquote>')}}{{Spec2('HTML4.01')}}
+ +

浏览器兼容性

+ + + +

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

+ +

参见

+ + -- cgit v1.2.3-54-g00ecf