CSS Equivalent of the “if” statement

前端 未结 12 1412
暖寄归人
暖寄归人 2020-12-01 13:49

Is there any way to use conditional statements in CSS?

12条回答
  •  一个人的身影
    2020-12-01 14:46

    No. But can you give an example what you have in mind? What condition do you want to check?

    Maybe Sass or Compass are interesting for you.

    Quote from Sass:

    Sass makes CSS fun again. Sass is CSS, plus nested rules, variables, mixins, and more, all in a concise, readable syntax.

提交回复
热议问题