How to write vertically in css: Use [writing-mode] to set the writing direction of the object. The syntax is [writing-mode: lr-tb, tb-rl], where [lr-tb] is from Left to right, from top to bottom, [tb-rl] from top to bottom, from right to left.
The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.
How to write vertically in css:
<strong>writing-mode</strong>
(Set the writing direction of the object)
Syntax:
writing-mode : lr-tb、tb-rl
Parameters:
lr-tb: left to right, top to bottom
tb-rl: from top to bottom, from right to left
css code:
div { writing-mode: tb-rl; }
Example:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>竖列排版实例</title> <style> div { writing-mode: tb-rl; } </style> </head> <body> <div>我是竖列排版</div> </body> </html>
Effect Picture:
Related tutorial recommendations: CSS video tutorial
The above is the detailed content of How to make words write vertically in css. For more information, please follow other related articles on the PHP Chinese website!