Vuejs2 限制引导vue中卡组中的卡数
我想将每行的卡数限制为4张,但卡不断被挤压到每行10张以上。我尝试使用引导容器,但没有成功Vuejs2 限制引导vue中卡组中的卡数,vuejs2,bootstrap-vue,Vuejs2,Bootstrap Vue,我想将每行的卡数限制为4张,但卡不断被挤压到每行10张以上。我尝试使用引导容器,但没有成功 <b-container > <b-row align-v = "center" order-xl> <b-card-group deck> <b-card v-for= "ids in info" v-bind:key="ids" :title="ids.name" :img-src="ids.images.xs" style="max-width: 20re
<b-container >
<b-row align-v = "center" order-xl>
<b-card-group deck>
<b-card v-for= "ids in info" v-bind:key="ids"
:title="ids.name"
:img-src="ids.images.xs"
style="max-width: 20rem;"
min-cols = 3
>
<b-card-text>
<h5>
.....
</h5>
</b-card-text>
</b-card>
</b-card-group >
</b-row>
</b-container>
</div>
.....
您应该为卡设置最小宽度属性:
<b-card v-for= "ids in info" v-bind:key="ids"
:title="ids.name"
:img-src="ids.images.xs"
style="max-width: 20rem;"
class="mw-25"
min-cols = 3
>
<b-card-text>
<h5>
.....
</h5>
</b-card-text>
</b-card>
.....
mw-25
是一个引导类,它将最小宽度设置为25%。您应该为卡设置最小宽度属性:
<b-card v-for= "ids in info" v-bind:key="ids"
:title="ids.name"
:img-src="ids.images.xs"
style="max-width: 20rem;"
class="mw-25"
min-cols = 3
>
<b-card-text>
<h5>
.....
</h5>
</b-card-text>
</b-card>
.....
mw-25
是一个引导类,它将最小宽度设置为25%