CSS is a simple method for creating vertical lines of text.

Source: Internet
Author: User

We often need to create someVertical barsOfTextMaybe this is a very simple thing for you, but have you ever thought about using it?CSSCan there be N ways to create vertical lines of text? The following is an article translated from Nettuts +. I hope these methods will bring you some tips.

Method 1: <br/> label

One possible method (but not recommended) is to add a <br/> label after each letter to implement vertical text:

Demo

<H1> N <br/> E <br/> T <br/> U <br/> T <br/> S 

Tip: the code can be modified before running!

Never use this method. It is lame and hasty.

Method 2: static package

In this way, we wrap each letter in a span and set its display attribute in CSS to block.

View demo

<! DOCTYPE html> 

Tip: the code can be modified before running!

The problem with this method is that apart from the terrible labels, it requires you to manually enclose each letter in a span. If these texts are dynamically generated by CMS, do not use this method.

For more information, click the next page!

  • Four pages in total:
  • Previous Page
  • 1
  • 2
  • 3
  • 4
  • Next Page

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.