【发布时间】:2020-11-29 01:57:44
【问题描述】:
在下面的示例中,是否可以设置字母间距,以便所有三行都自动在两侧对齐?
我相信使用 javascript 可以做到这一点,但我更喜欢仅使用 css 的解决方案
.logo{
position:absolute;
text-align:justify;
text-align-last:justify;
}
<div class='logo'>LOREM IPSUM<br>DOLOR<br>SIT AMET</div>
【问题讨论】:
-
这能回答你的问题吗? CSS text justify with letter spacing
-
@bowlowl - 谢谢,但是这么小的事情代码太多了