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