0
点赞
收藏
分享

微信扫一扫

混合器定义组来实现样式复用

辰鑫chenxin 2023-02-24 阅读 224


定义   mixin.scss

@mixin rounded-corners {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}

使用 

<style lang="scss" scoped>
@import "~@/styles/mixin.scss";

通过@include来使用这个混合器,放在你希望的任何地方
notice {
background-color: green;
border: 2px solid #00aa00;
@include rounded-corners;
}


举报

相关推荐

0 条评论