CSS等价于“if”声明 [英] CSS Equivalent of the "if" statement

查看:115
本文介绍了CSS等价于“if”声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在CSS中使用条件语句?

Is there any way to use conditional statements in CSS?

推荐答案

否。但你能举个例子你的想法吗?

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

可能 Sass 指南针对您来说很有趣。

Maybe Sass or Compass are interesting for you.

Sass的报价:


Sass让CSS再次有趣。 Sass是CSS,加上嵌套的规则,变量,mixin等等,都以简洁易读的语法。

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

这篇关于CSS等价于“if”声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆