[英]Prevent hover over active state
如果它已經通過css處於活動狀態,如何防止將button,div,li懸停?
#list-of-tests .item-test:hover {
background-color: #4d5f75;
border: solid 1px #4d5f75;
}
#list-of-tests .item-test:active {
background-color: #93c3cd;
border: solid 1px #93c3cd;
}
兩種方式:
1)對!important
:active
使用!important
:
#list-of-tests .item-test:active {
background-color: #93c3cd !important;
border: solid 1px #93c3cd !important;
}
2)指定多種狀態:
#list-of-tests .item-test:active,
#list-of-tests .item-test:active:hover {
background-color: #93c3cd;
border: solid 1px #93c3cd;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.