LESS - 另类垂直居中混入类

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

.vertical-middle(@tag) {
    text-align:         center!important;

    &:after {
        content:            '';
        display:            inline-block;
        width:              0;
        height:             100%;
        vertical-align:     middle;
    }

    @el:        ~"@{tag}";

    & > @{el} {
        display:            inline-block!important;
        vertical-align:     middle!important;
        text-align:         left;
    }
}