如何均匀地对齐左右两侧的文本

时间:2017-05-29 07:48:38

标签: css

如何左右对齐文字?有人可以帮助我吗?

例如:
enter image description here

我的代码:



p {
  line-height: 200%;
}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="col-md-6">
  <p>Lorem ipsum dolor sit amet,consecteture adipiscing elit,sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volupat.Ut wisi enim ad minim veniam,quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea
    commodo consequat.Duis autem vel eum iriure dolor in hendr</p>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:4)

&#13;
&#13;
p {
  line-height: 200%;
  text-align: justify;
}
&#13;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="col-md-6">
  <p>Lorem ipsum dolor sit amet,consecteture adipiscing elit,sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volupat.Ut wisi enim ad minim veniam,quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea
    commodo consequat.Duis autem vel eum iriure dolor in hendr</p>
</div>
&#13;
&#13;
&#13;