css实现溢出文本省略号显示

li { 
    width : 30%;
}

li a {
    text-overflow: ellipsis;
    white-space: nowrap;    /* 限制不换行 */
    overflow: hidden;     /* 隐藏溢出 */
}

猜你喜欢

转载自www.cnblogs.com/miny-simp/p/8941729.html