强制换行word-break:break-all或者word-wrap:break-word都无效的解决方法

1、word-wrap对行内元素是没有效果的

2、一般情况下,元素拥有默认的white-space:normal(自动换行,不换行是white-space:nowrap),可能是元素中设置的white-space是norwrap导致,无法换行。所以需要

3、对table 的td 标签下的元素设置word-wrap:word-break是没有效果的 

white-space:normal; // this it is
word-break:break-all; //or word-wrap:break-word;

转自:https://blog.csdn.net/github_39319000/article/details/80595516

posted @ 2022-07-18 17:43  虚无——缥缈  阅读(2149)  评论(0编辑  收藏  举报