Prefixes.scssCSS 前缀处理工具

联合创作 · 2023-09-19 20:48

Prefixes.scss 是一个 Sass/Scss 的 CSS(3) 前缀处理Mixins library,免安装,直接import,可自定义需要的前缀。

示例:

Scss:

@import "prefixes";

.example {
    @include clearfix();
    @include border-radius(4px);
    @include box-shadow(0 1px 5px rgba(0, 0, 0, .5));
}

Sass:

@import "prefixes"

.example
    @include clearfix()
    @include border-radius(4px)
    @include box-shadow(0 1px 5px rgba(0, 0, 0, .5))

CSS:

.example {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    -ms-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    -o-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); 
}

.example:before, .example:after {
    content: " ";
    display: table; 
}

.example:after {
    clear: both; 
}
浏览 4
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报