2015-10-18 54 views
1

我喜歡引導按鈕組風格,我不喜歡活動切換。我不能禁用活動狀態,除非我點擊按鈕。如何禁用啓動按鈕組上的活動切換組

如何禁用按鈕切換?

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> 

回答

0

你正在尋找的是.focus CSS聲明,:focus

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

否決,如果你想改變它 - 作爲例子 - >http://jsfiddle.net/w7rzqLz3/ - 您可以將其設置爲與其他州相同background-colorborder-color

相關問題