bootstrap-vue - 如何在 bootstrapVue 中使一列 3 张卡片的高度匹配?
问题描述
我有一排包含卡片的 3 列,b-card-text
(卡片中的文本)的长度不相等,因此使卡片的高度不同。问题是如何使卡片的高度匹配?
尝试向h-100 d-inline-block
卡片添加课程,但没有运气。
<b-row>
<b-col class md="4">
<b-card>
<b-card-text>Lorem Ipsum is simply dummy text of </b-card-text>
</b-card>
</b-col>
<b-col class md="4">
<b-card class="h-75 d-inline-block">
<b-card-text>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
</b-card-text>
</b-card>
</b-col>
<b-col class md="4">
<b-card>
<b-card-text>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard
</b-card-text>
</b-card>
</b-col>
</b-row>
我希望卡片的高度相同。
解决方案
在<b-row>
添加类class="align-self-stretch"
,或使其仅适用于md
断点和上断点:class="align-self-md-stretch"
. h-100
然后在每个上使用实用程序类<b-card>
示例:https ://jsfiddle.net/ofcxrquz/
看:
https://bootstrap-vue.js.org/docs/reference/utility-classes
https://getbootstrap.com/docs/4.3/utilities/flex/#align-self
推荐阅读
- jestjs - 在开玩笑测试中将函数作为参数传递
- sql - 列中相同值序列内的 Oracle 行号
- oracle - ORA-01722: 执行查询时数字无效
- https - 带有 github 页面的 HTTPS - 未找到 www 子域;其他人工作
- python - Django抱怨在子查询中使用查询时必须在子查询中使用它
- python-3.x - 从远程服务器(Debian)上的 Laravel 控制器运行 Python3 时出现 Symfony/Process 异常
- php - 如何让 Google 报告 API 在 oauth2 访问令牌过期时刷新它?
- asp.net - 如何从asp.net core mvc中的HttpClient类调用[HttpPatch]类型的API动作
- angular - 与变量的双向绑定而不是使用发射器?
- python - 仅从 Python 中的句子中获取唯一的单词