我在DIV中放置了一个段落,但当文本超出DIV时,它不会换行,而是超出DIV范围。我尝试使用以下代码:-moz-hyphens:auto; -ms-hyphens:auto; -webkit-hyphens:auto; hyphens:auto; word-wrap:break-word;
,但它没有起作用。有什么建议吗?
这是DIV的代码:
<div id="content">
<p id="test">tfufygigighfetefddddddddddddsssssssssssssssssssssssssssssssssssssssssssfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</p>
</div>
的CSS代码:
#content {
float:left;
position:absolute;
background-color:#D4D3D0;
height:500px;
width:80%;
}
以及段落的CSS:
p.test {
-moz-hyphens:auto;
-ms-hyphens:auto;
-webkit-hyphens:auto;
hyphens:auto;
word-wrap:break-word;
}