twitter-bootstrap - 如何在卡片组中添加链接?

标签 twitter-bootstrap vue.js vuejs2 bootstrap-4 vue-component

我从这里获得引用: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/

相关文章:

javascript - Owl Carousel 2 分页标题不按顺序排列

jquery - Bootstrap 表格滚动条

jquery - Bootstrap carousel 在另一个 bootstrap carousel 里面

javascript - 如何使用 vue.js 2 提交表单?

css - Vue 组件 - 包含 Laravel 目录中的 css 文件

javascript - js无法访问Vue

css - 如何更改 bootstrap css 中的事件链接颜色?

vue.js - 如何使用Vue transition 来扩展和收缩一个div

javascript - vue3 + vee-validate - handleSubmit 不返回值

javascript - 如何在没有多个属性的情况下在 semantic-ui-vue 下拉列表中显示占位符?