0

我正在聊天,但我遇到了 CSS 问题。我宁愿在图片上展示它。

这是它的样子:http: //i.stack.imgur.com/7v7vV.png

这就是我希望它的样子:http: //i.stack.imgur.com/7v7vV.png

我该怎么做?谢谢。

4

2 回答 2

0

使用例如这个CSS:

p {
    text-indent: -50px; //put your first line 50px to the left
    margin-left: 50px; //put the rest 50px to the right
}
于 2013-01-04T14:32:04.880 回答
0

我猜到了标记,但是像这样的东西呢 - http://jsfiddle.net/YnPU2/

html:

<p>
    <span class="time">20:20:20</span>
    <span class="author">quwquu</span>
    <span class="text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span>
</p>
<p>
    <span class="time">20:20:22</span>
    <span class="author">dfghdg</span>
    <span class="text">when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span>
</p>​

CSS:

p { overflow: hidden; vertical-align: top; }
p span { display: table-cell; }
p .time { width: 62px; }
p .author { width: auto; padding-right: 9px; }
p .text { width: auto; }​
于 2013-01-04T14:45:28.550 回答