CSS:如何阻止文本占用超过1行?
  是否有文字包装或其他任何可以阻止文字换行的属性?  我有一个高度, overflow:hidden ,文本仍然中断。 
需要在CSS3之前的所有浏览器中工作。
div {
  white-space: nowrap;
  overflow: hidden;
}<div>test that doesn't wrap</div>您可以使用CSS white-space Property来实现此目的。 
white-space: nowrap
使用省略号将在最后添加...。
   <style type="text/css">
    div {
      white-space: nowrap;
      overflow: hidden;
text-overflow: ellipsis;
    }
    </style>
上一篇: CSS: how to stop text from taking up more than 1 line?
下一篇: Problem setting specific member of CornerRadius in style setter
