CSS多行多列 间隔 ,文字超出省略

.village-list  {
    margin:0 auto;
    width: calc(100% - 10px);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.village-list:after {
    content: ' ';
    width: -webkit-calc((100% - 3px*2)/ 2);
    width: calc((100% - 3px*2)/ 2);
}

.village-list .village-item {
    width: -webkit-calc((100% - 2px*2)/ 2);
    width: calc((100% - 2px*2)/ 2);
    background: rgba(255, 255, 255, 0.1);
    height: 32px;
    line-height: 32px;
    font-family: Microsoft YaHei UI, Microsoft YaHei UI;
    font-weight: 400;
    font-size: 14px;
    text-align: left;
    padding-left:10px;
    color: #C8C9CC;
    margin-bottom:1px;
    // 文字超出部分省略号
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
// 偶数
.village-item:nth-child(even){
    margin-left:1px;
  
}
// 奇数
.village-item:nth-child(odd){
    margin-left:1px;
}
 

 

posted @ 2024-05-24 10:21  Birdgeduan  阅读(6)  评论(0编辑  收藏  举报