当文字多行时,且最后一行文字不足一铺满整个宽度. 则文字会居中对齐"
xxxxxxxx xxxxxxxx xx " 好比上面这样.. 这样的话要如何解决,让他left对齐
小伙看你根骨奇佳,潜力无限,来学PHP伐。
The problem is that now you can’t guarantee that the length of the above two lines is the same, in Chinese or the same. In English, some letters in different fonts have different widths.
<p style="text-align:center"> <!--你原本的 p --> <p style="max-width:需要换行的宽度;text-align:left;display:inline-block"> <!-- max-width dislay:inline-block低版本ie可能不支持 --> 文字,文字,文字 </p> </p>
text-align: left;
The problem is that now you can’t guarantee that the length of the above two lines is the same, in Chinese or the same. In English, some letters in different fonts have different widths.