Twitter Bootstrap 3:如何将块居中 [英] Twitter Bootstrap 3: How to center a block
本文介绍了Twitter Bootstrap 3:如何将块居中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我看来,bootstrap 3 样式表中缺少 center-block
类.我错过了什么吗?
这里描述了它的用法,http://getbootstrap.com/css/#helper-classes-center一个>
解决方案
这是 Bootstrap 3.0.1 版本中的新内容,因此请确保您拥有最新的 (10/29)...
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="样式表"/><div class="row"><div class="center-block" style="width:200px;background-color:#ccc;">...</div>
It seems to me that the class center-block
is missing from the bootstrap 3 style sheets. Am I missing something?
Its usage is described here, http://getbootstrap.com/css/#helper-classes-center
解决方案
It's new in the Bootstrap 3.0.1 release, so make sure you have the latest (10/29)...
Demo: http://bootply.com/91632
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="center-block" style="width:200px;background-color:#ccc;">...</div>
</div>
这篇关于Twitter Bootstrap 3:如何将块居中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文