我有以下引导表:
<div class="row">
<div class="col-md-12" >
<table style="cursor:pointer;" class="table table-striped table-bordered table-hover table-condensed">
<thead>
<th>header1</th>
</thead>
<tbody>
<tr>
<td>
<div>
<ul>
<li>
<span>text1></span>
</li>
<li>
<span>text3></span>
</li>
</ul>
<span>some long text that i want to break</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
ul标签内的span数是动态的,我不想包装它们。 我想打破最后一个span标签内的内容,让它们以给定的宽度换行,我该怎么做?感谢。
答案 0 :(得分:0)
给出块的span显示属性并设置宽度如下:
.row span {
width: 100px;
display: block;
}
这是jsfiddle http://jsfiddle.net/pF8vd/