html table设置成强制不换行

在html文件中添加如下代码:

<style type="text/css">
    table td{word-break: keep-all;white-space:nowrap;}
    table th{word-break: keep-all;white-space:nowrap;}
</style>
posted @ 2018-08-03 11:11  zifeiy  阅读(599)  评论(0编辑  收藏  举报