2017-03-15 97 views

回答

4

我已經更新了小提琴。只需在您想用作標籤的按鈕上添加一個ID,並提供以下css pointer-events:none。它不會改變按鈕的顏色。

Updated Fiddle

片段

@import url('http://getbootstrap.com/dist/css/bootstrap.css'); 
 
#label-btn { 
 
    pointer-events: none; 
 
}
<div class="btn-group"> 
 
          <a href="#" role="button" class="btn btn-success btn-xs" id="label-btn" aria-disabled="true">T</a> 
 
          <button type="button" class="btn btn-default btn-xs" aria-label="Import" data-toggle="tooltip" title="Import"> 
 
           <span class="glyphicon glyphicon-import" aria-hidden="true"></span> 
 
          </button> 
 
         </div>