我正在使用 bootstrap 4 alpha 3。
我想将卡片在页面中间水平居中。
预览/链接:
http://codepen.io/vaibhavsingh97/full/VjRAXW
我已经尝试了卡片的 bootstrap 4 示例页面上列出的所有不同选项。
我怎样才能做到这一点?
最佳答案
为 .card 添加 css
.card {
margin: 0 auto; /* Added */
float: none; /* Added */
margin-bottom: 10px; /* Added */
}
这里是 pen
更新:
您可以使用 bootstrap 4 中可用的类 .mx-auto
来居中卡片。
关于html - 如何在 bootstrap 4 中将卡片居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39031224/