我有多个具有引导标签样式的<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;
}

<span class="label">text</span>

最佳答案

尝试这个

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

关于html - 引导标签相交,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35536145/

10-11 13:11