看吧,山上的矮松越发的青黑,树尖上顶着一髻儿白花,好像日本的看护妇。山尖全白了,给蓝天镶上一道银边。山坡上,有的地方雪厚点,有的地方草色还露着。
本文实例讲述了CSS实现连续字符换行的方法。分享给大家供大家参考。具体分析如下:
连续字符的CSS换行,主要用到CSS的word-break属性,为其添加:break-all参数,这样的话字符会适应规定的宽度而自动换行,实际上这就是CSS的强制换行功能。
复制代码
代码如下:<title>连续字符的CSS换行代码</title>
<table width="120" border="2">
<tr><td style="word-break:break-all">ddddddddddddddddddddddddddddddddddddrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvvvvvvvvxxxxxxxxxxxxxxxxxxxxxxxxxxhhhhhhhhhhhhhhhhhhhhhhnnnnnnnnnnnnnnnnnnnnnnnn</td></tr></table>
<table width="120" border="2">
<tr><td style="word-break:break-all">ddddddddddddddddddddddddddddddddddddrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvvvvvvvvxxxxxxxxxxxxxxxxxxxxxxxxxxhhhhhhhhhhhhhhhhhhhhhhnnnnnnnnnnnnnnnnnnnnnnnn</td></tr></table>
希望本文所述对大家的div+css网页设计有所帮助。
本文CSS如何实现连续字符换行的方法到此结束。梦的方向叫做闯小编再次感谢大家对我们的支持!