CSS Text Vertical Layout method

Source: Internet
Author: User

Sometimes, we need to page a region of the text vertical, vertical arrangement, the horizontal of course, everyone is accustomed to, for the vertical row, a time can not find the idea, oh, in fact, as simple as the horizontal, here are 4 ways to implement the CSS text vertical row.

The first method is to put the characters that need vertical display in span, set the display property of span in the CSS block, but this method is not recommended, because some trouble, the code is as follows:

The second method A: Also using CSS, in the need to vertical display, to enforce the definition of the width of the display area, so that characters will automatically vertical arrangement: see the specific code:

The second method B: The same is the use of CSS, recommended this method, think this method is compatible, and the code is simple, characters are easy to control.

The third Way: using JavaScript (not recommended, in fact, such a small function, the use of JS is too bad, after all, we have more effective, more concise approach)

The four methods are finished, which one is more suitable for you? Compare yourself, according to your own actual choice, each method has its own.

Note : Please pay attention to the triple programming Tutorials section for more wonderful articles .

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.