Not CSS selectors

后端 未结 8 2015
礼貌的吻别
礼貌的吻别 2020-11-28 11:05

Is there some kind of \"not\" CSS selector?

For example when I write the following line in my CSS, all input fields inside an tag with class classname will

8条回答
  •  臣服心动
    2020-11-28 11:34

    I think the closest you can get is to only affect direct descendants with a declaration

    This code for example will only affect input fields directly under divs with class "maincontent"

    div.maincontent > input {
      // do something
    }
    

提交回复
热议问题