我从这里获得引用:https://bootstrap-vue.js.org/docs/components/card/#card-deck-groups
脚本是这样的:
<div>
<b-card-group deck>
<b-card title="Title"
img-src="https://picsum.photos/300/300/?image=41"
img-alt="Img"
img-top>
<p class="card-text">
This is a wider card with supporting text below as a
natural lead-in to additional content. This content
is a little bit longer.
</p>
<div slot="footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</b-card>
<b-card title="Title"
img-src="https://picsum.photos/300/300/?image=41"
img-alt="Img"
img-top>
<p class="card-text">
This card has supporting text below as a natural lead-in
to additional content.
</p>
<div slot="footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</b-card>
<b-card title="Title"
img-src="https://picsum.photos/300/300/?image=41"
img-alt="Img"
img-top>
<p class="card-text">
This is a wider card with supporting text below as a natural
lead-in to additional content. This card has even longer content
than the first to show that equal height action.
</p>
<div slot="footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</b-card>
</b-card-group>
</div>
我想在标题和图片中添加链接
我该怎么做?
最佳答案
您必须从 b-card
中删除 title 属性,并在 b-card-body
中使用 b-link
相反……
<b-card img-src="https://picsum.photos/300/300/?image=41"
img-alt="Img"
img-top
>
<b-card-body>
<b-link to="/">
Title
</b-link>
<p class="card-text">
This is a wider card with supporting text below as a
natural lead-in to additional content. This content
is a little bit longer.
</p>
</b-card-body>
</b-card>
关于twitter-bootstrap - 如何在卡片组中添加链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52568601/