场景:

最左边这栏我不行让他换行,怎么办呢?

下面是解决办法:

 

[plain] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. table{  
  2.     width:100px;  
  3.     table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */  
  4. }  
  5. td{  
  6.     width:100%;  
  7.     word-break:keep-all;/* 不换行 */  
  8.     white-space:nowrap;/* 不换行 */  
  9.     overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */  
  10.     text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/  
  11. }  


参考:http://www.52design.com/html/201007/design201071123721.shtml

 

现在:

posted on 2015-01-09 14:42  一个人的天空@  阅读(1530)  评论(0编辑  收藏  举报