Web page Text vertical style sheet (CSS) method

Source: Internet
Author: User
css| Page | There are two important properties in the text processing attribute of the Stylesheet style sheet: Writing-mode and text-align. Let's take a look at their usage first:
1. Writing-mode (Set object writing direction)
Syntax: WRITING-MODE:LR-TB, TB-RL
Parameters: Lr-tb: From left to right, from top down
TB-RL: From top down, right to left
Example: div {writing-mode:tb-rl;}
2. Text-align (Sets the alignment of the text in the object)
Grammar: Text-align:left, right, center, justify
Parameters: Left: Align Right: right-aligned
Center: Centered Justify: Justified
Example: div {text-align:center;}
Next, let's make an example of a tight row:
< HTML >
< head >
< title > Vertical Text </title >
< style type= "Text/css" >
<!--
. TNT {WRITING-MODE:TB-RL; TEXT-ALIGN:LEFT;FONT-SIZE:9PT}
-->
</style >
< BODY >
< div class= "TNT" >
Indeed, the vertical line of presentation text is very easy to implement in word processing Office software. Since this effect is not much seen in the production of Web pages, the discussion on this issue is relatively small. But in the production of Chinese ancient characteristics of the site, such as the text history, calligraphy, tourist sites and so on site, if the use of vertical text, with the antique background and simple old colors, in the visual will get unexpected results.
</div >
</body >

We can know that the attribute value of "Writing-mode" for the text is "Tb-rl", the text is "from top to bottom", and the property value of "Text-align" is "left", and the text is "Right-to-left". In summary, the contents of < div >......</div > will be arranged in a defined way.
The last point to be explained is "Writing-mode" currently only IE browser support, Nestscape Browser does not support!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.