引导程序2有一个data-toggle属性,可以设置为buttons-radio,如下所示:
<div class="btn-group" data-toggle="buttons-radio">
<button id="1" class="btn">One</button>
<button id="2" class="btn">Two</button>
<button id="3" class="btn">Three</button>
</div>现在,我需要有相同的功能,在按钮组中的引导带3。我如何在按钮之间切换活动类?
发布于 2014-04-30 20:47:46
在Bootstrap 3中有非常类似的功能
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>这里的例子:http://getbootstrap.com/javascript/#buttons-examples
https://stackoverflow.com/questions/23397666
复制相似问题