如何在使用Boostrap Vue时对齐卡标题



我正在使用boostrap vue的<b-card>,遇到了一个问题,我似乎无法将标题道具居中对齐。有人知道这样做的好方法吗?以下是我的卡片的内容,它有一个动态标题img src和子文本(与标题不同,它实际上是居中对齐的(:

<b-card
:title="obj.name"
:img-src="mainImage()"
img-alt="project info"
img-top
tag="article"
style="max-width:30rem"
bg-variant="dark"
text-variant="white"
class="mb-3 text-center"
>
<a class="subtext card-block stretched-link text-decoration-none" :href="endpoint()">
{{ obj.subtext }}
</a> 
</b-card>

b-card内使用b-card-title。

<b-card-title class="text-center">{{obj.name}}</b-card-title>

最新更新