How can I remove CSS element style inline (without JavaScript)?

前端 未结 6 1028
旧时难觅i
旧时难觅i 2020-12-18 22:22

I have a style assigned for a specific HTML element in my stylesheet file, like this


label {
  width: 200px;
  color: red; 
}

In one speci

6条回答
  •  爱一瞬间的悲伤
    2020-12-18 22:39

    You can use the :not selector:

    label:not([for="status"]) {
      width: 200px;
      color: red; 
    }
    

    Support seems to date back to around 2009 (FF3.5)

提交回复
热议问题