word-break:brea-all;word-wrap:break-word的区别

//form==>http://www.cnblogs.com/2050/archive/2012/08/10/2632256.html

<p style="background:#000; width:100px; color:#F00; word-wrap:break-word" data-mce-style="background: #000; width: 100px; color: #f00; word-wrap: break-word;">haha 555555555555555555555555555555555
</p>

<p style="background:#000; width:100px; color:#F00; margin-top:10px; word-break:break-all" data-mce-style="background: #000; width: 100px; color: #f00; margin-top: 10px; word-break: break-all;">haha 555555555555555555555555555555555
</p>


 

  word-break:break-all;不但让单词从溢出变折行,还让上面未被填充的区域补齐,反正我觉得吧,比word-wrap好用点..

你可能感兴趣的:(word-break)