Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道如何生成单独的类名,例如:
.class1 { } .class2{ } .class2{ } ...
但是,如果我希望它们都具有 10 px 的边距,则会产生大量重复的代码。我可以生成类似的东西:
.class1, .class2, .class3, ... { //Common properties }
少于?
.Less 最近添加了@extend 功能。尝试这个:
:extend(.class-name)