楼上的text-align-last有兼容性问题,可以用下面这样
html
<div class="justify">汪 星 人</div>
<div class="justify">那 美 克 星 人</div>
<div class="justify">地 球 男 人</div>
css
.justify {
text-align: justify;
width: 200px;
border: 1px solid blue;
height: 18px;
}
.justify::after {
content: "";
display: inline-block;
width: 100%;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…