【发布时间】:2012-10-29 20:27:34
【问题描述】:
我有一个问题,我需要在其他 css 类中使用 css 类的一个属性。
.class_a {margin:10px;宽度:360px;向左飘浮;颜色:#ffffff; ...等等...}
.class_b { .class_a of margin }
仅在 class_b 中使用 class_a 的边距
谢谢!
【问题讨论】:
-
在纯 CSS 中不可能。像 LESS 这样的 CSS 预处理器可以做到这一点。
-
你为什么要这样做?
-
你能不能把margin的声明移到一个新的类中,然后将该类添加到接收
class_a的HTML元素中? -
我想使用 jquery ui 主题,但只是颜色和 bg-s。
标签: css