2023-06-04T13:41:17.png

html

<div class="ddiv">

            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>


            <div class="ljdiv">
    <a href="链接" target="_blank" title="简介">
    <p class="name">
    <img src="图标">
    名称
  </p>
    <p class="desc">简介</p>
  </a>
    </div>






    </div>
  

css

    .ddiv{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.ljdiv{
    width: 16%;
    background-color: white;
    border-radius: 8px;
    transition: 0.3s all;
    margin-bottom: 15px;
    position: relative;
}
 a {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    padding: 0 5%;
}
 p.name {
    color: #333;
    font-weight: bold;
    font-size: 15px;
    line-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 25px;
}
 p.name img {
    width: 18px;
    height: 18px;
    margin: auto;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}
 p.desc {
    width: 100%;
    font-size: 13px;
    color: #858f9a;
    line-height: 1.5;
    margin-bottom: 5%;
    word-break: break-all;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

鼠标悬停链接样式

.ljdiv:hover {
    box-shadow: 0px 0px 6px #3b75fb;
    transition: 0.3s all;
}

2023-06-04T13:44:15.png