August 14, 2000 - Text Rotation within an Object
August 14, 2000|
Text Rotation within an Object
Tips: August 2000
Yehuda Shiran, Ph.D.
"tb-rl". You can retrieve this property as:
and set it as:
object.style.writingMode = sFlowDir;
sFlowDir can be one of the following:
|Content flows from left to right and from top to bottom. The next horizontal line will be placed underneath the current one. All glyphs are positioned upright. The default.|
|Content flows from top to bottom and from right to left. The next vertical line is positioned to the left of the current line. Wide-cell glyphs are positioned upright; nonwide-cell glyphs Â also known as narrow Latin or narrow Kana glyphs Â are rotated 90-degrees clockwise.|
"tb-rl" style is mostly used in Asian typography, you can also use it to place English typography on its "side", similarly to how you see a book on a shelf. The following script implements a paragraph that the user can flip on its side by clicking the mouse anywhere on the page:
Here is the object:
Click anywhere on the page and see how the text inside the object rotates 90 degrees each time.