文本两端对齐

//html
<div class="item">
    <span class="label" >{{item.label}}</span>:
    <span class="value">{{item.value}}</span>
</div>

//scss
.item {
    height: 32px;
    line-height: 32px;
    margin-bottom: 8px;
    .label {
        display: inline-block;
        height: 100%;
        width: 100px;
        text-align: justify;
        vertical-align: top;
        &::after {
            display: inline-block;
            width: 100%;
            content: '';
            height: 0;
        }
    }
    .value {
        padding-right: 10px;
    }
}

linkurl:http://www.daqianduan.com/6806.html

posted @ 2020-07-16 15:07  iwen1992  阅读(119)  评论(0编辑  收藏  举报