经常使用。可是常忘,我又不是写css的。所以记下来:
先设置一下限制的宽度,
display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;