如何编写css控制文字在table或div中自动换行?大家都知道连续的英文或数字能是容器被撑大,不能根据容器的大小自动换行,下面是CSS如何将文字换行的方法!
大家都知道连续的英文或数字能是容器被撑大,不能根据容器的大小自动换行,还要考虑不同浏览器兼容问题,下面是CSS如何将他们换行的方法!
对于table
1.(IE浏览器)使用样式table-layout:fixed;
<style>
.tb{table-layout:fixed}
</style>
<tableclass="tbl"width="80">
<tr><td>
abcdefghigklmnopqrstuvwxyz1234567890
</td></tr>
</table>
.tb{table-layout:fixed}
</style>
<tableclass="tbl"width="80">
<tr><td>
abcdefghigklmnopqrstuvwxyz1234567890
</td></tr>
</table>
