2015-07-20 62 views
0

我想我可能完全误解了这一点。手写笔 - mixin - 变量

但说我有这个重复的CSS代码。

.dot_one { 
    animation: dot_one 2s infinite linear; 
} 
.dot_two { 
    animation: dot_two 2s infinite linear; 
} 
.dot_three { 
    animation: dot_three 2s infinite linear; 
} 

我不应该能够提取它作为一个函数吗? (但在手写笔一个mixin)

dot_mix(myVar) 
    animation: myVar 2s infinite linear; 

dot_mix(.dot_one) 

回答