我想要一些text-align:justify
块,但它们之间的字距相同。
有人有解决方案吗?
我尝试使用负字距,但这不是解决方案。
text-align:justify;
word-spacing:-1px;
谢谢!
好吧,当文本设置为justify
时,您无法设置负值。您必须设置一个更高的值,例如 10px
.
在这 3 种解决方案之间进行选择:
.justify {
text-align: justify;
}
.word-spacing {
word-spacing: 10px;
}
.both {
text-align: justify;
word-spacing: 10px;
}
<p class="justify"><b>Justify</b><br>
Continually architect user-centric products for interactive experiences. Authoritatively supply goal-oriented meta-services without one-to-one synergy. Monotonectally formulate bleeding-edge ROI before fully tested networks. Authoritatively fabricate leading-edge infrastructures for enabled solutions. Competently communicate open-source total linkage before.
</p>
<p class="word-spacing"><b>Word Spacing Only</b><br>
Continually architect user-centric products for interactive experiences. Authoritatively supply goal-oriented meta-services without one-to-one synergy. Monotonectally formulate bleeding-edge ROI before fully tested networks. Authoritatively fabricate leading-edge infrastructures for enabled solutions. Competently communicate open-source total linkage before.
</p>
<p class="both"><b>Justfy + Word Spacing</b><br>
Continually architect user-centric products for interactive experiences. Authoritatively supply goal-oriented meta-services without one-to-one synergy. Monotonectally formulate bleeding-edge ROI before fully tested networks. Authoritatively fabricate leading-edge infrastructures for enabled solutions. Competently communicate open-source total linkage before.
</p>