假设我有固定的高度行和我插入一些文本到其列。如果它太长了,我想它被切断,并在该行的末尾应该这样添加三个点:如何在Bootstrap列中使用文本溢出?
我使用文本溢出:省略号;属性在我的行中,但不能得到它的工作。
我在做什么错?
HTML
<div class="container">
<div class="row text">
<div class="col-xs-4" style="border: solid">
Some really long text! Some really long text! Some really long text! Some really long text! The end! Some really long text! The end! Some really long text! The end! Some really long text! The end!
</div>
</div>
</div>
CSS
.row {
margin: 2px 0;
}
.text {
word-wrap: break-word;
height: 50px;
text-overflow: ellipsis;
}