js强制换行支持火狐[firefox]浏览器

作者:袖梨 2022-06-25
提示:您可以先修改部分代码再运行
firefox-break-word
if there were less sympathy in the world, there would be less trouble in the world. ( o. wilde )
1.(ie浏览器)连续的英文字符和阿拉伯数字,使用word-wrap : break-word ;或者word-break:break-all;实现强制断行 #wrap{word-break:break-all; } 或者 #wrap{word-wrap:break-word; }
abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111
效果:可以实现换行 2.(firefox浏览器)连续的英文字符和阿拉伯数字的断行,firefox的所有版本的没有解决这个问题,我们只有让超出边界的字符隐藏或者,给容器添加滚动条 #wrap{word-break:break-all; overflow:auto;}
abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111
效果:容器正常,内容隐藏
提示:您可以先修改部分代码再运行

相关文章

精彩推荐