如何在网页中将整段文字左右对齐

2012/3/8 9:12:26   阅读:3036    发布者:3036

  我们在制作网页的时候,常常会想使让其中的或者整段的文字左右对齐,下面深圳网站建设就教你如何在网页中使用各种方式来左右对齐文字:

使用<p>标签。

1中文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify; text-justify:inter-ideograph">
只有付出的爱是痛苦的,但比这更痛苦是爱一个人却没有勇气让那人知道你的感情。</div>

1英文对齐:<br>
<div style="font-size:12px;width:300;text-align:justify;text-justify:inter-ideograph">It hurts to love someone and not be loved in return. But what is more painful is to love someone and never find the courage to let that person know how you feel.
</div>
<br>