动态 Css 媒体查询

Dynamic Css Media Query

@media (min-width: THIS-VALUE) {
.CLASS {
    Width: QUERY-WIDTH;
}

这可能吗?
请举例说明。
谢谢

这可能是 css 预处理器的一个例子。您可以在 less 中设置可以在整个 css.

中重复使用的变量

Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

检查几个选项:

http://lesscss.org/

不可能 CSS。您可以在 css 预处理器中使用它,例如 Less、sass、SCSS、Stylus 等

在这种情况下,您可以使用 % 来设置全尺寸宽度。