0

我有这个 html 代码

<section class="group5">
    <p ><span class="purple">1)</span>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie. Sed aliquam sem ut arcu. Phasellus sollicitudin. 
    Vestibulum condimentum  facilisis nulla. In hac habitasse platea dictumst. Nulla nonummy. Cras quis libero.</p>
    <p ><span class="purple">2)</span>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec molestie. Sed aliquam sem ut arcu. Phasellus sollicitudin. 
    Vestibulum condimentum  facilisis nulla. In hac habitasse platea dictumst. Nulla nonummy. Cras quis libero.</p>
    </section>

这个CSS

p {
    margin-bottom:7px;      
    color:#161414;
    }

a, p a {
    text-decoration:underline;
    color:white;
    }
    a:hover {color:white;}

.group5 {
    float: left;
    width: 350px;
    position: relative;
    background:transparent;
    padding:15px;
    margin-bottom:10px;
    }

.purple{
    font-size:50px;
    color: #663366; 
    float:left;
    padding:12px;
    margin:20px;
}

如何格式化段落,我的意思是证明段落中的文字是合理的?

我得到以下未格式化的结果

在此处输入图像描述

我读到有

 div
{
text-align:justify;
text-justify:inter-word;
}

但这仅适用于IE...

4

2 回答 2

1

解决方案是

p {
    margin-bottom:7px;
    text-align: justify; 
    color:#161414;
}
于 2012-12-24T23:16:26.380 回答
0

你也可以使用

<p align="justify">.. . . . . . . </p>
于 2012-12-25T04:54:08.833 回答