如何禁用 bootstrap 按钮组上的活动切换

how to disable active toggle on bootstrap button group

我喜欢 bootstrap 按钮组样式,我不喜欢活动切换。我无法禁用活动状态,除非我点击按钮。

如何禁用按钮切换?

can't find active class

<div class="btn-group" aria-label="..." style="margin-bottom: 20px;">
    <button type="button" class="btn btn-primary" onclick="import_all_db(this)">import_all_db</button>
    <button type="button" class="btn btn-primary" onclick="import_all_qcloud(this)">import_all_qcloud</button>
    <button type="button" class="btn btn-primary" onclick="import_all(this)">import_all</button>
</div>

您要查找的 CSS 声明是 .focus, :focus :

.btn-primary.focus, .btn-primary:focus {
    color: #fff;
    background-color: #286090;
    border-color: #122b40;
}

否决如果你想改变它 - 如示例 -> http://jsfiddle.net/w7rzqLz3/ - 你可以将它设置为具有相同的 background-colorborder-color 与其他州一样。