Skip to content

Commit f11694d

Browse files
authored
zh-cn: update the translation of <bdo> element (mdn#18337)
1 parent 55f9c22 commit f11694d

File tree

1 file changed

+81
-45
lines changed
  • files/zh-cn/web/html/element/bdo

1 file changed

+81
-45
lines changed
+81-45
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,112 @@
11
---
2-
title: "<bdo>: 双向文本替代元素"
2+
title: <bdo>:双向文本覆盖元素
33
slug: Web/HTML/Element/bdo
4+
l10n:
5+
sourceCommit: fdd3ac5598c3ddceb71e59949b003936ae99f647
46
---
57

68
{{HTMLSidebar}}
79

8-
HTML 双向文本替代元素 (**`<bdo>`**) 改写了文本的方向性,使文本以不同的方向渲染呈现出来 (override 可以翻译很多意思,编程语言中多用覆盖,重载;这里采用了 Google 的整体翻译,取替代替换改写之意)
10+
[HTML](/zh-CN/docs/Web/HTML) **`<bdo>`** 元素覆盖了当前文本的方向,使文本以不同的方向渲染出来。
911

1012
{{EmbedInteractiveExample("pages/tabbed/bdo.html", "tabbed-standard")}}
1113

12-
文本的字符是从给定方向的起始点绘制的; 各个字符的方向不受影响 (因此字符集不会向后拉,例如).
13-
14-
<table class="properties">
15-
<tbody>
16-
<tr>
17-
<th scope="row">内容分类</th>
18-
<td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories">流式元素</a>, <a href="/zh-CN/docs/Web/Guide/HTML/Content_categories">短语元素</a>, 显式元素。</td>
19-
</tr>
20-
<tr>
21-
<th scope="row">许可内容</th>
22-
<td><a href="/zh-CN/docs/Web/Guide/HTML/Content_categories">短语元素</a>.</td>
23-
</tr>
24-
<tr>
25-
<th scope="row">标记省略</th>
26-
<td>{{no_tag_omission}}</td>
27-
</tr>
28-
<tr>
29-
<th scope="row">许可父级元素</th>
30-
<td>接受<a href="/zh-CN/docs/Web/Guide/HTML/Content_categories">短语元素</a>的任何元素</td>
31-
</tr>
32-
<tr>
33-
<th scope="row">隐式 ARIA 角色</th>
34-
<td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">No corresponding role</a></td>
35-
</tr>
36-
<tr>
37-
<th scope="row">许可 ARIA 角色</th>
38-
<td>任何</td>
39-
</tr>
40-
<tr>
41-
<th scope="row">DOM 接口</th>
42-
<td>{{domxref("HTMLElement")}}直到 Gecko 1.9.2 (包括 Firefox 4) 为止,Firefox 均为此元素实现 HTMLSpanElement 接口。</td>
43-
</tr>
44-
</tbody>
45-
</table>
14+
文本的字符是从给定方向的起始点开始绘制的;各个字符的方向不受影响(例如,字符因此而不会反向绘制)。
4615

4716
## 属性
4817

49-
元素属性包含[全局属性](/zh-CN/docs/Web/HTML/Global_attributes)
18+
元素属性包含[全局属性](/zh-CN/docs/Web/HTML/Global_attributes)
5019

5120
- `dir`
5221

53-
- : 在此元素内容中呈现文本的方向。可能的值是
22+
- : 文本在此元素内容中渲染的方向。可能的值有
5423

55-
- ltr: 指示文本应从左到右的方向
56-
- rtl: 指示文本应从右到左的方向
24+
- `ltr`:指示文本应从左到右绘制
25+
- `rtl`:指示文本应从右到左绘制
5726

5827
## 示例
5928

6029
```html
61-
<!-- Switch text direction -->
62-
<p>This text will go left to right.</p>
63-
<p><bdo dir="rtl">This text will go right to left.</bdo></p>
30+
<!-- 反转文本方向 -->
31+
<p>该文本应从左到右绘制。</p>
32+
<p><bdo dir="rtl">该文本应从右到左绘制。</bdo></p>
6433
```
6534

6635
### 结果
6736

6837
{{EmbedLiveSample('示例')}}
6938

70-
## 注意
39+
## 备注
7140

7241
HTML 4 规范未指定此元素的事件。它们是在 XHTML 中添加的。这很可能是疏忽。
7342

43+
## 技术概要
44+
45+
<table class="properties">
46+
<tbody>
47+
<tr>
48+
<th scope="row">
49+
<a href="/zh-CN/docs/Web/HTML/Content_categories"
50+
>内容分类</a
51+
>
52+
</th>
53+
<td>
54+
<a href="/zh-CN/docs/Web/HTML/Content_categories#流式内容"
55+
>流式内容</a
56+
>、<a href="/zh-CN/docs/Web/HTML/Content_categories#短语内容"
57+
>短语内容</a
58+
>、可感知内容。
59+
</td>
60+
</tr>
61+
<tr>
62+
<th scope="row">允许的内容</th>
63+
<td>
64+
<a href="/zh-CN/docs/Web/HTML/Content_categories#短语内容"
65+
>短语内容</a
66+
>。
67+
</td>
68+
</tr>
69+
<tr>
70+
<th scope="row">标签省略</th>
71+
<td>不允许,开始标签和结束标签都不能省略。</td>
72+
</tr>
73+
<tr>
74+
<th scope="row">允许的父级元素</th>
75+
<td>
76+
任何接受<a href="/zh-CN/docs/Web/HTML/Content_categories#短语内容"
77+
>短语内容</a
78+
>的元素。
79+
</td>
80+
</tr>
81+
<tr>
82+
<th scope="row">隐式 ARIA 角色</th>
83+
<td>
84+
<code
85+
><a href="/zh-CN/docs/Web/Accessibility/ARIA/Roles/generic_role"
86+
>generic</a
87+
></code
88+
>
89+
</td>
90+
</tr>
91+
<tr>
92+
<th scope="row">允许的 ARIA 角色</th>
93+
<td>任意</td>
94+
</tr>
95+
<tr>
96+
<th scope="row">DOM 接口</th>
97+
<td>
98+
直到 Gecko 1.9.2(Firefox 4)为止是 {{domxref("HTMLElement")}},Firefox 为该元素实现了
99+
<code
100+
><a href="/zh-CN/docs/Web/API/HTMLSpanElement"
101+
>HTMLSpanElement</a
102+
></code
103+
>
104+
接口。
105+
</td>
106+
</tr>
107+
</tbody>
108+
</table>
109+
74110
## 规范
75111

76112
{{Specifications}}
@@ -81,4 +117,4 @@ HTML 4 规范未指定此元素的事件。它们是在 XHTML 中添加的。这
81117

82118
## 参见
83119

84-
- 相关 HTML: {{HTMLElement("bdi")}}
120+
- 相关 HTML 元素:{{HTMLElement("bdi")}}

0 commit comments

Comments
 (0)