使文本溢出边界显示为省略号 #p{ 100px; white-space:nowarp; //强制文本在一行显示 overflow:hidden; //移除文本隐藏 text-overflow:ellipsis; //截断本文显示为省略号 }