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 .