.shangpin div p{ /* width: 213px; */ font-size: 16px; text-overflow: ellipsis; white-space:nowrap; overflow: hidden; }
文字区域设置
父级设置
.shangpin div{ /* margin-left: -100px; */ flex: 1; width: 0; }
需要设置
width: 0;
标签:flex,width,div,设置,超出,overflow,shangpin,隐藏 From: https://www.cnblogs.com/zongcheng86/p/17221198.html