HBCMS更多的中文手册参考:

writing-mode Attribute | writingMode参数属性

DHTML文档教程

Sets or retrieves the direction and flow of the content in the object.

dhtml语法

HTML { writing-mode : sFlow }
Scriptingobject.style.writingMode(v) [ = sFlow ]

DHTML可能的值

sFlowString that specifies or receives one of the following values.
lr-tbDefault. Content in the object flows horizontally—from left to right, top to bottom. The next horizontal line is positioned underneath the previous line. All glyphs are positioned upright. This layout is used in Roman-based typography.
tb-rlContent in the object flows vertically—from top to bottom, right to left. The next vertical line is positioned to the left of the previous line. Wide-cell glyphs are positioned upright; nonwide-cell glyphs—also known as narrow Latin or narrow Kana glyphs—are rotated 90-degrees clockwise. This layout is used in East Asian typography.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of lr-tb. The proposed Cascading Style Sheets (CSS) attribute is inherited by all objects with the following exceptions: button, caption, input, input type=button, input type=file, input type=password, input type=reset, input type=submit, input type=text, isindex, option, TEXTAREA.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

Remarks

The property is read-only for the currentstyle object.

the property does not accumulate. for example, if a parent element has the writingmode property set to tb-rl, setting a child element's writingmode property to tb-rl does not cause the child element to rotate.

an element has its own layout if the value for the writingmode property is different than its parent. when a change in layout flow is specified for a child element, the maximum logical height requirement (height in this element's coordinate system) is determined by the available space (width measurement) in the parent's coordinate system. based on this information, a logical width (width in the child's coordinate system) is computed to meet the maximum logical height requirement. depending on the amount of space needed by the child element, the actual logical height of the element can be less than the maximum logical height requirement.

when you use elements that have different values for the writingmode property, you can have greater control over the layout of those elements by specifying fixed dimensions for each one.

DHTML代码范例

The following example shows how to use the writingMode property to nest horizontal text inside vertical text.

<HTML>
<STYLE>
.clsHoriz 		{ writing-mode:lr-tb }
</STYLE>
</HEAD>
<BODY>
<H1>writing-mode Attribute</H1>
<P>This example shows how to use the <B>writing-mode</B> attribute to
display horizontal text (<SPAN >lr-tb</SPAN>) within vertical text
(<SPAN>tb-rl</SPAN>).</P>
<P>The following <B>DIV</B> element has a <B>writing-mode</B> of tb-rl
and contains text and <B>SPAN</B> child elements. The text flow alternates
between vertical and horizontal. Note the effect of the <B>BR</B> element
after the second set of vertical text.</P>
<DIV STYLE="writing-mode:tb-rl">
First Set of Vertical Text
<SPAN CLASS="clsHoriz">First Set of Horizontal Text</SPAN>
Second Set of Vertical Text plus a line break<BR>
<SPAN STYLE="writing-mode:lr-tb">Second Set of Horizontal Text</SPAN>
Third Set of Vertical Text
<SPAN CLASS="clsHoriz">Third Set of Horizontal Text</SPAN>
</DIV>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This property is part of a proposed addition to Cascading Style Sheets (CSS) Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, currentStyle, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, hn, HR, I, INPUT, INPUT type=button, INPUT type=file, INPUT type=password, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, MARQUEE, MENU, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, runtimeStyle, S, SAMP, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TD, TEXTAREA, TH, TT, U, UL, VAR