2017-05-24 172 views
0

我一直在努力尋找相關的CSS,我需要在引導改變,以防止在點擊一個按鈕,這個效果(見附件圖片)引導刪除按鈕,點擊效果

enter image description here

任何幫助會很大最感謝!

編輯:下面是相關代碼:

<div class="btn-group" dropdown container="body"> 
         <button dropdownToggle type="button" class="btn dropdownToggle" style="background-color:#337ab7;color:white;"> 
          Views <span class="caret"></span> 
         </button> 
</div> 

編輯2:我設法與此代碼刪除邊框:

.btn:focus, 
.btn:active:focus, 
.btn.active:focus, 
.btn.focus, 
.btn:active.focus, 
.btn.active.focus { 
    outline: none; 
} 

但是,仍然是,當我點擊的效果該按鈕(參見下圖):

enter image description here

是否也可以刪除它?

+0

你嘗試'概述:0 '和/或'border:0'? –

+0

使用F12並搜索HTML。 HTML是否有JavaScript調用函數?它可能是JavaScript中的運行時CSS,或者在做元素選擇時它會出現在F12中 –

回答

1

最有可能的默認輪廓,這裏的自舉3.3.7通用下拉例如無輪廓:

button:focus { 
 
    outline: none; 
 
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
 
<div class="dropdown"> 
 
    <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 
 
    Dropdown 
 
    <span class="caret"></span> 
 
    </button> 
 
    <ul class="dropdown-menu" aria-labelledby="dLabel"> 
 
    ... 
 
    </ul> 
 
</div>

0

您可能需要添加一行的CSS,過度乘坐的引導,如:

button { 
border:0!important; 
} 
2

你必須設置.btn:focus {outline: 0;}。如果您需要在全球範圍內取消重點只是用這個:focus {outline: 0;}

對於第二個問題只是用

.btn.active, 
.btn:active { 
    box-shadow: none; 
} 
+0

謝謝,我只能接受一個答案,所以我upvoted您的帖子,而不是 – user517406

0

你也將刪除陰影:

.btn.active, .btn:active { 
    -webkit-box-shadow: none; 
    box-shadow: none; 
}