设置单行文本超出隐藏 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 但有的时候三个点会只显示一个或者两个,在这个时候就只需要再设置1em的右内边距就可以了; padding-right:1em