Home >Web Front-end >JS Tutorial >Let the text rotate 90 degrees and 180 degrees on the page_Typical special effects
The new function of IE5.5: rotate text, you will understand after taking a look. The usage is as follows:
Get the writing mode:
object.style.writingMode
Set the writing mode:
object.style.writingMode = sFlowDir
where sFlowDir is
lr-tb or tb- One of rl
Setting value Effect
lr-tb Default object direction, that is, from left to right, top to bottom order
tb-rl The arrangement of objects is from top to down, arranged from right to left. The Chinese text is facing upward, and the English text is rotated 90 degrees clockwise.
The code is as follows: