如例子
在li中,当减少width时。文字的宽度大于content时,使其变为省略号。
css代码样式如下:
height: 30px;
line-height: 30px;
padding: 0 80px 0 30px;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;