Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

<bdo>

这篇翻译不完整。请帮忙从英语翻译这篇文章

Summary

The HTML <bdo> Element (or HTML bidirectional override element) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.

Usage Context

Content categories Flow content, phrasing content, palpable content.
Permitted content Phrasing content.
Tag omission 不允许,开始标签和结束标签都不能省略。
Permitted parent elements Any element that accepts phrasing content.
DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element.

Attributes

这个标签所包含的 全局属性.

dir
这个标签包含文本的文本方向. 属性值可为:
  • ltr: 从左往右写,与现代汉语的书写习惯相同.
  • rtl: 从右往左写,与古代汉语书写习惯相同.
  • auto: 自动,由浏览器决定文字的排列方向.

示例

<!-- Switch text direction -->
<p>This text will go left to right.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p>

结果

This text will go left to right.

.tfel ot thgir og lliw txet sihT.

Notes

The HTML 4 specification did not specify events for this element; they were added in XHTML. This is most likely an oversight.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
<bdo>
Living Standard  
HTML5
<bdo>
Recommendation  
HTML 4.01 Specification
<bdo>
Recommendation  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) ? ? ? (Yes)

文档标签和贡献者

 此页面的贡献者: wleonid
 最后编辑者: wleonid,