2017-05-29 97 views
-1

如何將文本左右兩邊均勻對齊?任何人都可以幫助我嗎?如何將文本左右兩邊對齊

例如:
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>

回答

4

p { 
 
    line-height: 200%; 
 
    text-align: justify; 
 
}
<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>