Vue.js 如何在vue引导中自定义卡的图像大小

Vue.js 如何在vue引导中自定义卡的图像大小,vue.js,bootstrap-4,vuejs2,vue-component,bootstrap-vue,Vue.js,Bootstrap 4,Vuejs2,Vue Component,Bootstrap Vue,我正在从事一个NuxtJS项目,使用BootstrapVue作为前端框架。我正在尝试编辑插入卡片标题内的图像大小,代码如下: <b-card bg-variant="primary" text-variant="white" img-alt="Image" img-src="~/assets/images/house.png"

我正在从事一个NuxtJS项目,使用BootstrapVue作为前端框架。我正在尝试编辑插入卡片标题内的图像大小,代码如下:

<b-card
          bg-variant="primary"
          text-variant="white"
          img-alt="Image"
          img-src="~/assets/images/house.png"
          header="The house"
          class="text-center position-relative"
        >
          <b-card-text>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
          </b-card-text>
          <b-button variant="primary" class="paragraph stretched-link"
            >Click here</b-button
          >
        </b-card>

Lorem ipsum dolor sit amet,是一位杰出的献身者。
点击这里

有人知道是否可以通过b-card属性(没有CSS)自定义图像的样式吗?文档对我没有帮助。

您可以使用
img height
img width
来提供卡内的图像大小,它们接受字符串或数字作为值:

<b-card
          bg-variant="primary"
          text-variant="white"
          img-alt="Image"
          img-src="~/assets/images/house.png"
          img-height="200"
          img-width="200"
          header="The house"
          class="text-center position-relative"
        >


你好,Boussadjrai,谢谢你的回答。你的方法绝对是个好方法!但不幸的是,它不够灵活,无法像我尝试的那样定位图像。我想我会通过SCS来操纵它。无论如何谢谢你!还有其他道具,如
img top
img start
,请在此处查看
img-*
的完整列表