0
我在遇到左浮动跨度和右浮动跨度之间存在省略号文本(.title)时遇到问题。发生溢出时,将长度下推至新行。我怎样才能解决这个问题?文本溢出省略号,在浮动左跨度和浮动右跨度之间的跨度
JS FIDDLE: http://jsfiddle.net/VfHdS/6/
HTML:
<div class="song">
<span class="tracknumber">4</span>
<div class="title">This is the song tittle!!!!!!!!!!!</div>
<span class="length">4:31</span>
</div>
CSS:
.song {
font-size: 14px;
padding: 2px 20px;
}
.tracknumber {
margin-right: 10px;
}
.title {
color: #262626;
display:inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.length {
float: right;
}
'文本溢出:省略号;'工作,只有块的容器。阅读更多在[W3](http://dev.w3.org/csswg/css-ui/#text-overflow0) – 2013-04-24 01:13:11
仍然没有运气http://jsfiddle.net/VfHdS/6/。 – user1508287 2013-04-24 01:27:06
@Sonu Joshi:内联块也是块容器。 – BoltClock 2013-04-24 01:37:53