首页 > Web开发 > 详细

css中 @mixin的使用

时间:2019-11-25 13:35:57      阅读:202      评论:0      收藏:0      [点我收藏+]
mixin定义(使用@mixin定义):
@mixin hexagon-generator($hexagon-width, $factor, $border-radius){
  display: inline-block;
  border-radius: 50%;
  width: ($hexagon-width + $border-radius) * $factor;
  height: ($hexagon-width + $border-radius) * $factor;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hexagon-shape {
    @include hexagon-generator(88rpx, 1, 8rpx);
}

使用
.hexagon-shape {
    display: inline-block;
    border-radius: 50%;
    width: (88rpx + 8rpx) * 1;
    height: (88rpx + 8rpx) * 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

转载:https://blog.csdn.net/liya_nan/article/details/81479995

css中 @mixin的使用

原文:https://www.cnblogs.com/huanhuan55/p/11926954.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!