单词之间的空白上的折线 [英] Break line on white space between words

查看:78
本文介绍了单词之间的空白上的折线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在空白处换行并将下一个单词放在新行上?

Is it possible to break line on white space and place the next word on a new line?

在下面的示例中,结果应类似于第二个标题:

In the following example the result should look like the second title :

.test{
  text-align:center;
}
h1{  
  display:inline-block;
}
span{
   position:relative;
   top:50px;
   right:45px;
}

<div class="test">
<h1>split this</h1>
<h2>split <span>this</span> </h2>
</div>

是否可以在每个空白处断开行?

推荐答案

对于

You could use a very high value for the word-spacing property. It will break lines on each white space between words :

.test{
  text-align:center;
}
h1{
  word-spacing:9999px;
}

<div class="test">
<h1>split this</h1>
</div>

这篇关于单词之间的空白上的折线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆