文本对齐中心与对齐

时间:2015-08-05 09:43:30

标签: css html5 css3

enter image description here

我想将中心属性与文本/内容的对齐方式对齐。你们任何人都可以帮助我吗? 除IE版本以外的所有浏览器兼容性

请参阅屏幕以了解。希望它只与文本中心合理......

3 个答案:

答案 0 :(得分:7)

你可以试试这个:

.center-justified {
text-align: justify;
-moz-text-align-last: center;
text-align-last: center;
}

答案 1 :(得分:0)

你可以试试这个

HTML:

<div class="center-justified"></div>

的CSS:

    .center-justified {
text-align: justify;
-moz-text-align-last: center;
text-align-last: center;
}

现场演示:http://jsfiddle.net/L4pzm/336/

答案 2 :(得分:0)

.justified-center {
  text-align: justify;
  margin: 0 auto;
  width: 500px;
}
<div class="justified-center">...lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots
  and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots of text......lots and lots
  of text...</div>