如何将卡置于引导程序4中? [英] How to center cards in bootstrap 4?

查看:104
本文介绍了如何将卡置于引导程序4中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用bootstrap 4 alpha 3.

我想在页面中间水平居中卡。

I am using bootstrap 4 alpha 3.
I want to center the card horizontally in the middle across the page.

预览/连结: http://codepen.io/ vaibhavsingh97 / full / VjRAXW

我尝试了bootstrap 4示例页面上列出的所有不同选项。

I have tried all the different options listed on the bootstrap 4 example page for cards.

我怎样才能做到这一点?

How can I achieve this?

推荐答案

为.card添加css

Add the css for .card

.card {
        margin: 0 auto; /* Added */
        float: none; /* Added */
        margin-bottom: 10px; /* Added */
}

这里是

更新:
您可以使用引导程序4中可用的类 .mx-auto 将卡片放入中心。

这篇关于如何将卡置于引导程序4中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆