CSS Equivalent of the “if” statement

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

Is there any way to use conditional statements in CSS?

12条回答
  •  甜味超标
    2020-12-01 14:23

    css files do not support conditional statements.

    If you want something to look one of two ways, depending on some condition, give it a suitable class using your server side scripting language or javascript. eg

提交回复
热议问题