div{ max-width: 500px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;/*文本不换行*/ }
如上代码所示,限制文段宽度,可用width或max-width,方法简单但实用。