[英]word-wrap:break-word in 100% table-cell
JSFiddle: http://jsfiddle.net/nw4dF/ JSFiddle: http : //jsfiddle.net/nw4dF/
So, why in my table-cell #c, the css rule word-wrap:break-word
is ignored and cause the elongation of the table in case of overflow? 那么,为什么在我的表格单元#c中,css规则
word-wrap:break-word
被忽略,并在溢出的情况下导致表格伸长? I don't want use word-break: break-all;
我不想使用
word-break: break-all;
, how to solve? , 怎么解决?
Use word-break
instead of word-wrap
for webkit + opera and hypehns
for moz and IE10+ (you need a lang
attribute declared). 对于Webkit + Opera,请使用
word-break
而不是word-wrap
对于hypehns
和IE10 +,请使用hypehns
(需要声明lang
属性)。 For earlier versions of IE you'll just have to use word-break: break-all
. 对于早期版本的IE,您只需使用
word-break: break-all
。
<div id="a" lang="en">
...
</div>
#c {
*word-break: break-all;
word-break: break-word;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
try this - jsfiddle.net/nw4dF/1/ 试试这个-jsfiddle.net/nw4dF/1/
or you could change table syntax on div or something more flexible 或者您可以更改div上的表语法或更灵活的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.