gpt4 book ai didi

html - 2行文本后的省略号

转载 作者:行者123 更新时间:2023-11-27 23:09:09 25 4
gpt4 key购买 nike

我希望添加省略号,以便仅显示 2 行文本。不应显示“香港大学”。

enter image description here

contentTitle___1tY09 {
margin: 0 0 0 1.2rem;
font-size: 1.1rem;
line-height: 1.2rem;
display: inline-block;
width: 100%;
color: #484848;
text-transform: capitalize;
}

最佳答案

        
.blue-back {
background-color:#0000ff2b;
}

.blue-back p.mb-0 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}


.row .col-md-4:last-child .blue-back {
background-color:red;
}
<div class="row">
<div class="col-md-4">
<div class="blue-back" style="width: 50px;">
<p class="mb-0 text-center text-white">Fase</p>
<p style="font-size:29px; font-weight:600;" class="mb-0 text-center text-white font-weight-600">kjshasjkhklahfsjkfdsf dsfsdfsdfsdnfds fdsfsdfdsjfdkfnds </p>
</div>
</div>
<div class="col-md-4">
<div class="blue-back">
<p class="mb-0 text-center text-white">Fase</p>
<p style="font-size:29px; font-weight:600;" class="mb-0 text-center text-white font-weight-600">1</p>
</div>
</div>
<div class="col-md-4">
<div class="blue-back">
<p class="mb-0 text-center text-white">Fase</p>
<p style="font-size:29px; font-weight:600;" class="mb-0 text-center text-white font-weight-600">1</p>
</div>
</div>
</div>

关于html - 2行文本后的省略号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58625147/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com