CSS之文本两端对齐

 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;
    }}
but以上写法可以说是比较麻烦
 scss.item {
    margin-bottom: 8px;
    .label {
        display: inline-block;
        height: 100%;
        min-width: 100px;
        text-align: justify;
        text-align-last: justify;
    }
    .value {
        padding-right: 10px;
    }}

你可能感兴趣的:(CSS之文本两端对齐)