Bootstrap 5-卡元素在底部对齐

发布时间:2022-09-14 / 作者:清心寡欲
本文介绍了Bootstrap 5-卡元素在底部对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我是Bootstrap的新手,我尝试将一个按钮元素一直放在Card的底部,即使正文文本很小。但是,我总是收到这个结果,它没有将我的按钮放在我需要的右下角位置。

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">




  
  
  
  
  
  
  Document



  
Logo

John Doe

Developer

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Portfolio
Facebook Icon Instagram Icon Linkedin Icon Twitter Icon

推荐答案

由于您已经将元素嵌套在bootstrap row中,因此可以添加与justify-content: flex-end;同义的类justify-content-end。我还在a tag上声明了a tag的宽度。

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">




  
  
  
  
  
  
  Document



  
Logo

John Doe

Developer

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Portfolio

编辑~如果该行中有两个元素,并且我想将一个放在右边/开始,另一个放在左边/结束,该怎么办?&q;

然后使用justify-content-between。见下文。

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">




  
  
  
  
  
  
  Document



  
Logo

John Doe

Developer

This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Portfolio Portfolio

这篇关于Bootstrap 5-卡元素在底部对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持吉威生活!



[英文标题]Bootstrap 5 - Card Element Alignment on the Bottom


声明:本媒体部分图片、文章来源于网络,版权归原作者所有,如有侵权,请联系QQ:330946442删除。