设置元素text-overflow: ellipsis后引起的文本对齐问题

.ellipsis {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

  给元素设置了这个属性之后,该行内元素和旁边的行内元素不对齐,解决办法:

给改元素设置:

vertical-align: top;

  

原文地址:https://www.cnblogs.com/leaf930814/p/7337811.html