css单行文本超出盒子宽度限制长度 主要使用了超出部分隐藏和最大宽度属性 .app .app-text{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; height: 20px; font-size:20px; } <div class="app"> <span class="app-text">00</span><span>超出部分隐藏</span> </div>