gpt4 book ai didi

overflow - Bootstrap 4 : hide overflow in card-text

转载 作者:行者123 更新时间:2023-12-03 06:36:59 27 4
gpt4 key购买 nike

我有一张 bootstrap 4 卡,我想在其中隐藏字幕的溢出(并显示“...”)。我怎样才能实现这个目标?如果可能的话使用纯引导代码...

<div class="card-block p-1">
<p class="card-title">Test object</p>
<p class="card-subtitle text-muted">Added by Someone with a long name</p>
<p class="card-text mx-auto text-center"><span class="badge badge-pill badge-danger">€ 800</span></p>
</div>

最佳答案

只需使用text-truncate util 类..

  <div class="card">
<div class="card-block p-1">
<p class="card-title">Test object</p>
<p class="card-subtitle text-muted text-truncate">Added by Someone with a long name</p>
<p class="card-text mx-auto text-center"><span class="badge badge-pill badge-danger">€ 800</span></p>
</div>
</div>

https://www.codeply.com/go/bZufg6X1So

关于overflow - Bootstrap 4 : hide overflow in card-text,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45694288/

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