css控制td中的内容不换行

<style type="text/css">
.dt {table-layout:fixed; 100px;}
.dt td, .dt th{white-space:nowrap;overflow:hidden;}
</style>

<table class="dt">
      <tr>
      <td>文字1文字2文字3文字4文字5文字6文字7文字文字文字</td>
      </tr>

     </table>

原文地址:https://www.cnblogs.com/imbin/p/2756388.html