0
我嘗試禁用自定義button
並禁用(指針)功能工作正常。當禁用ng爲自定義按鈕時禁用css懸停效果
問題是當我們按下hover
時,hover
仍然有效。因此我需要禁用懸停。
我需要申請ng-disable
多個自定義buttons
我不能覆蓋每個按鈕的CSS。
代碼:
<button class="bt1" ng-disabled="true" >BUTTON</button>
<button class="bt2" ng-disabled="true" >BUTTON</button>
.bt1{
background-color: #e38000;
border: 0 none;
border-radius: 15px;
color: #ffffff;
font-size: 14px;
height: 30px;
width: 135px;
}
.bt1:hover{
background-color: #ffff00;
color: #999;
}
.bt2{
background-color: #33b3e3;
border: 0 none;
border-radius: 15px;
color: #ffffff;
font-size: 14px;
height: 30px;
width: 135px;
}
.bt2:hover{
background-color: #a2ddf4;
color: #999;
}
預先感謝您。
這裏問題是CSS已經寫入所有的按鈕。我們不能爲所有按鈕製作一般的CSS嗎? –
是的,你可以。但是,這兩個按鈕對於激活狀態和非激活狀態都有不同的顏色 – AdityaParab
如果您想共同使用':hover'邏輯,則必須爲禁用的按鈕定義通用樣式。 – AdityaParab