初始化加入

border-1px($color){
  position:relative;
}
border-1px($color):after{
    content:'';
    display:block;
    position:absolute;
    left:0;
    bottom:0;
    width: 100%;
    height: 1px;
    background-color: $color;
    -webkit-transform: scale(1,0.5);
    -ms-transform: scale(1,0.5);
    transform: scale(1,0.5);
} 

使用

.tab{
    display:flex
    width:100%
    height:40px
    line-height:40px
    border-1px(rgba(7, 17, 27, 0.1))
}

效果

上面是处理后的,下面是没做兼容的

还有方法我觉得写的太多了

地址:http://blog.csdn.net/shuidinaozhongyan/article/details/72628152

 

posted on 2018-01-04 17:19  执候  阅读(139)  评论(0编辑  收藏  举报