相交的Bootstrap标签

时间:2016-02-21 12:30:39

标签: html css twitter-bootstrap

我有多个带有引导标签样式的<span>元素,我得到了这个:

Image with problem.

如何解决这个问题?

更新:(添加了代码段)

&#13;
&#13;
.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;
&#13;
&#13;

1 个答案:

答案 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>