使用Sass的@mixin指令实现自动添加浏览器前缀

参考:https://blog.csdn.net/qwe502763576/article/details/79972783

我的简化:

<!-- 全局公共scss上引入-->   

@mixin webkit($type, $value) {
        -webkit-#{$type}: $value;
        -moz-#{$type}: $value;
        -o-#{$type}: $value;
        -ms-#{$type}: $value;
        #{$type}: $value;
}

@include webkit(transform,rotate(-35deg));
@include webkit(animation,searchLights 4.5s ease-in 1s infinite)

<!-- 等同于又臭又长的写法-->    
// -webkit-animation: searchLights 4.5s ease-in 1s infinite;
// -o-animation: searchLights 4.5s ease-in 1s infinite;
// animation: searchLights 4.5s ease-in 1s infinite;
原文地址:https://www.cnblogs.com/NanKe-Studying/p/13949015.html