Vertical current text with css

I would like to have a div with some text in it. But I would like the text to go vertically, not horizontally. Like this:

M

at

t

e

x

t

Any ideas on how to do this with CSS?

+2
source share
4 answers

If you have only one line of text, you can try using width:1em;letter-spacing:1px (and a space between each letter)

edit: if you do not want to use the space between letters width:1em;letter-spacing:1em;word-wrap:break-word

+5
source

CSS3 has the proposed attribute "write-mode", which can be set to "tb-lr" (write text from top to bottom, write lines from left to right), but I donโ€™t know if browsers support it, but nevertheless itโ€™s not that you can rely on.

+1
source
 .yourtext { -moz-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); -moz-transform-origin: top right; -webkit-transform-origin: top right; filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); } 
0
source

Please find the answer here, you can use text orientation and

Please check https://jsfiddle.net/yu7qr809/

 div{ text-orientation: upright; writing-mode: vertical-lr; } 
0
source

Source: https://habr.com/ru/post/916757/


All Articles