<分区>
我有一个标签,我需要在其中添加省略号,但我无法让它工作:
<label id="div2">This is some long text that will not fit in the box</label>
label#div2 {
white-space: nowrap;
width: 30px;
overflow: hidden;
text-overflow: ellipsis;
border: 1px solid #000000;
}