2015-02-11 74 views
1

懸停功能,我不能夠使用<ul> <li>懸停並點擊.. 裏面<li>標籤我有<button>標籤不<a>標籤。
我想要相同的懸停並單擊按鈕標記中的功能作爲僅錨點。用於UL李內部按鈕反應爲錨標記

我的CSS:

.custom-anchor:hover { 
color: #ffffff; 
background-color: #3276b1; 
text-decoration: none; 
} 

我的HTML:

<div class="btn-group"> 
    <button id="csr_duration_btn" 
      class="btn dropdown-toggle btn-xs btn-success" 
      data-toggle="dropdown">{{csrServiceModel.selectedDuration.name}}<i class="fa fa-caret-down"></i> 
    </button> 
    <ul id="comparision-chart-interval" class="dropdown-menu pull-right"> 
     <li data-ng-repeat="duration in csrServiceModel.durations"> 
      <button class="btn btn-link custom-anchor" data-ng-click="csrServiceModel.durationSelect(duration)" ng-disabled="duration.enabled">{{ duration.name }}</button> 
     </li> 
    </ul> 
</div> 

enter image description here 我嘗試添加相同的自定義類<li>標籤還,但它無法正常工作。

它應該像下面的圖片:

enter image description here

編輯:

你可以看到.....某些選項中列出禁用..有上點擊任何方式禁用選項列表不應該做任何事情..

我想防止萬一,如果禁用列表選項點擊..

請幫忙...

+0

你可以添加其他css標記嗎? – jbutler483 2015-02-11 09:37:24

+2

它看起來像bootstrap。添加以下css規則:#comparision-chart-interval li button {width:100%;} – 2015-02-11 09:38:56

+0

其他css默認由bootstrap提供.. – 2015-02-11 09:39:27

回答

1

它看起來像使用引導完成格式化。添加以下css規則:

#comparision-chart-interval li button { 
    width:100%; 
} 
+0

謝謝!老兄..我試了這個..#比較圖表 - 間隔li按鈕寬度:100%; text-align:left; } – 2015-02-11 09:46:16

+0

+ 1 upvote for you ...謝謝 – 2015-02-11 09:48:00