word-break属性
自动换行属性,使用word-break属性,可以让浏览器实现在任意位置换行
它有三个属性值分别为:
normal:浏览器中的默认换行行为
break-all:可允许在单词内换行
keep-all:只能在半角空格或连字符处进行换行
例:
<style>
.p1{
width:200px;
border:1pxsolid#ccc;
word-break:normal;
}
.p2{
width:200px;
border:1pxsolid#ccc;
word-break:keep-all;
}
.p3{width:200px;
border:1pxsolid#ccc;
word-break:break-all;
}
</style>
</head>
<body>
<pclass="p1">PhpChinesewebsiteprovidesalargenumberoffree,original,high-definitionphpvideotutorials.</p>
<pclass="p2">PhpChinesewebsiteprovidesalarge numberoffree,original,high-definitionphpvideotutorials.</p>
<pclass="p3">PhpChinesewebsiteprovidesalargenumberoffree,original,high-definitionphpvideotutorials.</p>
</body>


本文转载自中文网


本文转载自中文网
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56385.shtml