bootstrap-4 - Bootstrap Vue 的垂直间距

标签 bootstrap-4 bootstrap-vue

我在用

<b-row v-for="reptile in reptiles" :key="reptile.id">
    <b-col>
        {{ reptile.name }} 
    </b-col>

    <b-col>
        <b-button @click="deleteReptile(reptile)" variant="danger" size="sm">
            <i class="fas fa-trash"></i> Trash
        </b-button>
    </b-col>
</b-row>

我得到

enter image description here

我希望每行之间有一些垂直空间。我能想到六种方法来做到这一点。但是我想知道应该怎么做?

为了记录,我最想放一个 <br />&nbsp;在 b 键之后

或者

把它放在一张 table 上。

最佳答案

我会在行的底部添加一些边距。您可以使用 Bootstrap 的 spacing classes 轻松实现这一点。喜欢 mb-1 .. mb-5 ( m 代表 marginb 代表底部,数字是Bootstrap中定义的边距大小):

<b-row class="mb-2" ...>
    ...
</b-row>

关于bootstrap-4 - Bootstrap Vue 的垂直间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51344010/

相关文章:

html - 如何创建文本在顶部而不是居中的输入

html - 悬停时更改引导导航栏链接的颜色

html - 无法降低文本框的高度

twitter-bootstrap - 如何在bootstrap 4中垂直分布div框

javascript - bootstrap-vue Form File Upload没有样式,但是其他组件有?

javascript - 在 Vuejs 和 Bootstrap Vue 中编辑行

javascript - 在 Vuejs 上使用 Javascript 启用选项卡

html - 无法使用 bootstrap 4 作为框架使 div 内容正确对齐

css - Vuejs 从顶部导航栏中删除滚动条

javascript - Vue @change 事件在 <b-form-datepicker/> 中不起作用