有理由阻塞的字面

时间:2016-07-18 09:05:28

标签: html css styles justify

我想要一些text-align:justify块,但它们之间的字间距相同。

有人有解决方案吗?

我尝试使用负字间距,但这不是解决方案。

text-align:justify;
word-spacing:-1px;

谢谢!

1 个答案:

答案 0 :(得分:0)

嗯,当文本设置为justify时,您无法设置负值。您必须设置更高的值10px

在这三种解决方案中进行选择:

.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>