variable

有没有使用过 css variable,它解决了哪些问题?

css 变量减少样式重复定义,比如同一个颜色值要在多个地方重复使用,以前通过 less 和 sass 预处理做到,现在 css 变量也可以做到,方便维护,提高可读性 :root{ --bgcolor: blue; --color: r...