Here is my demo
span {
display: inline-block;
background: red;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 30px
}
.demo {
width: 90px;
}
<html lang="en">
<body>
<div class="demo">
<span>testtest</span>
<span>testtest</span>
<span>testtest</span>
<span>testtest</span>
<span>testtest</span>
<span>testtest</span>
</div>
</body>
</html>
it shows as follow:
I'm confused why it has the strange gap, and I don't want the extra gap, how can I do?