我的省略号有问题.以下是我的HTML:
<div id="wrapper">
<span id="firstText">This text should be effected by ellipsis</span>
<span id="lastText">this text should not change size</span>
</div>
有没有办法用纯CSS来做到这一点呢? 以下是我try 过的:
#firstText
{
overflow: hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
#lastText
{
white-space:nowrap;
overflow:visible;
}
这是如何显示的:
This text should be effected by ellipsis this text shoul
虽然这是我想要的结果:
This text should be e...this text should not change size