zoukankan      html  css  js  c++  java
  • 使用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;
  • 相关阅读:
    例5-6
    例5-5
    例5-4
    例4-5
    例4-4
    例4-3
    例4-2
    例3-11
    例3-10
    例3-9
  • 原文地址:https://www.cnblogs.com/NanKe-Studying/p/13949015.html
Copyright © 2011-2022 走看看