是否可以删除以下代码中指定的at-规则的复制粘贴?
animated {
animation: expand .7s;
-moz-animation: expand .7s;
-webkit-animation: expand .7s;
-o-animation: expand .7s;
}
@keyframes expand {
from {height: 502px;}
to {height: 558px;}
}
@-moz-keyframes expand {
from {height: 502px;}
to {height: 558px;}
}
@-webkit-keyframes expand {
from {height: 502px;}
to {height: 558px;}
}我想用一个位置定义关键帧(“从.到.”)(编码)
发布于 2013-11-05 09:33:53
不,你不能按规则分组。
这是前缀规则的缺点:您必须对每个前缀适当地重复值。
您可以使用Sass或更少的预处理器,它提供混合功能,编写生成所有前缀规则的混合程序,并在样式表中使用混合处理器,它将为您处理编译适当的CSS规则。但是,不能使用CSS对前缀at-规则进行分组而不重复这些值。
https://stackoverflow.com/questions/19785635
复制相似问题