How to set CSS rules for input, except one type

前端 未结 3 1758
慢半拍i
慢半拍i 2021-01-11 22:05

I have CSS rules for input as

input {
background:#FFFFFF
}
input:hover {
background:#BBBBBB
}

I want to apply this style to al

3条回答
  •  孤街浪徒
    2021-01-11 22:37

    You may use the :not() selector.

    input:not([type='submit']):hover {
    /* rules here */
    }
    

提交回复
热议问题