input 框必须要设置width和overflow属性,否则text-overflow不生效
input{
width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
}
当text-overflow值为ellipsis时表示 文本溢出是显示省略符号来代表被修剪的文本。