3

我在一个网站上工作,我有这个 CSS:

#aboutMe
{
    position:relative;
    left:20px;
    top:20px;
    behavior: url(/PIE.htc);
    -webkit-border-radius: 400px;
    -moz-border-radius: 400px;
    border-radius: 400px;
    background:#48c7ff;
    width:400px;
    height:400px;
    font-family:'Ciclef';
    color:#e9e9e9;
    padding:35px;
    line-height:25px;
}

#aboutMe p
{
    text-align:justify;
    font-size:16px;
}

但是,文本没有对齐,它是左对齐的。我怎样才能解决这个问题?

这是网站:http: //ibdesigns.net23.net/

“关于我”圈子(大约在页面的中间)是给我带来麻烦的段落。

4

2 回答 2

14

该文本是有道理的。对齐段落中的最后一行不会被拉伸(或压缩)以适应该行。

为了让它看起来更好(在支持的 CSS3 浏览器中text-align-last),你可以这样做:

text-align:justify;
text-align-last:center;
/* for IE9 */
-ms-text-align-last:center;
于 2012-05-26T19:48:32.100 回答
0

顺便说一句,你有没有观察到同样的情况<div>?文字从图像中移出;你可以考虑一个小的 CSS 更改:

#aboutMe p {
    text-align: justify;
    text-align-last: center;
    font-size: 16px;
    margin-left: 15px;
}

我补充说margin-left: 15px;

于 2012-05-26T22:31:32.397 回答