Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么;“自动换行”;css样式没有';t在a<;表>;(GWT)?_Css_Gwt - Fatal编程技术网

为什么;“自动换行”;css样式没有';t在a<;表>;(GWT)?

为什么;“自动换行”;css样式没有';t在a<;表>;(GWT)?,css,gwt,Css,Gwt,我们使用这个css来制作一个长字符串(例如URL,其中没有任何空格),以分成许多新行,而不是只显示一行: .wordWrap{ word-wrap:break-word; } 在.xml文件中 <table> <tr> <td> <g:HTMLPanel ui:field="myPanel" addStyleNames="{style.wordWrap}" > <g:Label text="Aa

我们使用这个css来制作一个长字符串(例如URL,其中没有任何空格),以分成许多新行,而不是只显示一行:

.wordWrap{  word-wrap:break-word;  }
在.xml文件中

<table>
    <tr>
       <td>
          <g:HTMLPanel ui:field="myPanel" addStyleNames="{style.wordWrap}" > <g:Label text="Aaaaaa..very long string without any space in it... aa"> <g:/HTMLPanel>
       </td>
    </tr>
</table>

这是行不通的

但是,如果我们删除
,它就可以正常工作

所以 为什么“word wrap”css样式在(GWT)中不起作用?

找到了答案

<table cellspacing="3" style="width: 100%; word-wrap:break-word; table-layout: fixed;">

您是否尝试过
空白
属性?这会解决你的问题

white-space: pre-wrap;
如果上述css不起作用,请尝试其他组合的
空白
属性


阅读更多关于thax的信息。

thax了解您的答案,但它不起作用。单词包装:打破单词;表布局:固定;“工作,但它真的很糟糕你尝试过其他组合的空白属性吗?我认为最简单的选择是不放入一个表,然后我们可以解决问题,但为什么要使用
?它需要布局吗?我不知道,但你可以尝试用
柔性表
来代替
,因为它使用起来很快,也许我可以我试试屈肌格