我有多个带有引导标签样式的<span>
元素,我得到了这个:
如何解决这个问题?
更新:(添加了代码段)
.label {
background-color: #5cb85c;
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
&#13;
<span class="label">text</span>
&#13;
答案 0 :(得分:0)
试试这个
<style type="text/css">
.label {
background-color: #5cb85c;
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
margin: 4px;
float: left;
}
</style>
<div class="col-sm-3">
<span class="label">2016-01-25</span>
<span class="label">2016-01-01</span>
<span class="label">2016-01-5</span>
<span class="label">2016-02-01</span>
<span class="label">2016-01-25</span>
<span class="label">2016-01-25</span>
<span class="label">2016-01-25</span>
<span class="label">2016-01-25</span>
</div>