bootstrap 2.3.2行不是内联的

时间:2014-06-18 17:50:21

标签: css twitter-bootstrap twitter-bootstrap-2

我不明白为什么这不是内联的:

http://jsfiddle.net/dugfresh/dUkz4/

<div class="btn-group" data-toggle="buttons-checkbox">
    <div class="row">
        <div class="span7"><button type="button" class="btn btn-primary">Sun</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Mon</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Tue</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Wed</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Thu</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Fri</button></div>
        <div class="span7"><button type="button" class="btn btn-primary">Sat</button></div>
    </div>
</div>

1 个答案:

答案 0 :(得分:1)

这是你在找什么?

小提琴http://jsfiddle.net/dUkz4/3/

html

<div class="btn-group" data-toggle="buttons-checkbox">
    <button type="button" class="btn btn-primary">Sun</button>
    <button type="button" class="btn btn-primary">Mon</button>
    <button type="button" class="btn btn-primary">Tue</button>
    <button type="button" class="btn btn-primary">Wed</button>
    <button type="button" class="btn btn-primary">Thu</button>
    <button type="button" class="btn btn-primary">Fri</button>
    <button type="button" class="btn btn-primary">Sat</button>
</div>

doc http://getbootstrap.com/2.3.2/components.html#buttonGroups

更新评论后:

您可以自定义空间的css:

.btn-group .btn{
    margin-right:5px;
}

制作类似

的内容
<div class="btn-group row-fluid" data-toggle="buttons-checkbox">
        <button type="button" class="btn btn-primary span1">Sun</button>
        <button type="button" class="btn btn-primary span1">Mon</button>
        <button type="button" class="btn btn-primary span1">Tue</button>
        <button type="button" class="btn btn-primary span1">Wed</button>
        <button type="button" class="btn btn-primary span1">Thu</button>
        <button type="button" class="btn btn-primary span1">Fri</button>
        <button type="button" class="btn btn-primary span1">Sat</button>
    </div>

以下是结果(响应):http://jsfiddle.net/dUkz4/4/