Mar*_*n07 6 html css frontend css3
我想让两个单词的字母从上到下垂直显示,并在最后一个单词上添加一个可控空间(一种填充顶部).(见下图)
(在Photoshop中,您可以通过在字母后按Shift + Enter获得上述效果.)
我得到了一些接近的东西,但有人可能知道更好的解决方案.
我的解决方案
Run Code Online (Sandbox Code Playgroud)<p>Stalk Me</p> <!-- is a HTML space entity --> p { font-size : 20px; width : 28px; /* depends on font-size */ line-height : 20px; /* depends on font-size */ word-wrap : break-word; text-transform : uppercase; text-align : center; }
谢谢!
你可以用text-orientation: upright和做writing-mode: vertical-rl.添加-webkit-,-ms- Browser vendor prefixes如果需要,像这样Demo.
p {
writing-mode: vertical-rl;
text-orientation: upright;
text-transform: uppercase;
font-weight: bold;
}Run Code Online (Sandbox Code Playgroud)
<p>Stalk Me</p>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
508 次 |
| 最近记录: |