3

我想像这个例子http://jsfiddle.net/xKSUH/一样对齐我的文本。我的问题是我的文本没有居中,第二行有一个空格...

我的 HTML

    <div class="row"> 
<div class="span12"> 


    Hello <span data-bind="text: viewModel.firstName()"></span>,
    We have analyzed <span data-bind="text: viewModel.user.nbAnalyzedMails()"></span>
    emails, extracted <span data-bind="text: viewModel.user.newMessages()"></span>
    new messages, please check report in your dashboard ></span> <br>



</div>  
</div>

CSS

.row {text-align: center}
4

1 回答 1

1

检查这个

CSS

.row {text-align: center}
.row .span12 p{
    display: inline-block;
    margin: 0px;
}

html

<div class="row"> 
    <div class="span12"> 
        <p>Hello <span data-bind="text: viewModel.firstName()"></span>,</p>
        <p>We have analyzed <span data-bind="text: viewModel.user.nbAnalyzedMails()"></span></p>
        <p>emails, extracted <span data-bind="text: viewModel.user.newMessages()"></span></p>
        <p>new messages, please check report in your dashboard.</p>
    </div>  
</div>
于 2013-08-05T18:34:07.140 回答