:not(:empty) CSS selector is not working?

后端 未结 11 1099
我寻月下人不归
我寻月下人不归 2020-11-28 06:22

I\'m having a heck of a time with this particular CSS selector which does not want to work when I add :not(:empty) to it. It seems to work fine with any combina

11条回答
  •  一向
    一向 (楼主)
    2020-11-28 06:38

    It is possible with inline javascript onkeyup="this.setAttribute('value', this.value);" & input:not([value=""]):not(:focus):invalid

    Demo: http://jsfiddle.net/mhsyfvv9/

    input:not([value=""]):not(:focus):invalid{
      background-color: tomato;
    }

提交回复
热议问题