【发布时间】:2016-05-10 23:37:11
【问题描述】:
我正在尝试为我的 div/ul 添加间距,如 Bootstrap Utilities Documents 中所示。但它根本不起作用,我什至无法在 Firebug 中跟踪该类。
http://v4-alpha.getbootstrap.com/components/utilities/#spacing
我的 HTML 代码
<div>
<ul class="p-t-20">
<li><a href="#" class="fa fa-calendar fa-lg"> Events</a> </li>
</ul>
</div>
我尝试同时使用 m-t-20 或 p-t-20 或其他组合。但它根本不起作用。我该如何使用这些引导类?
我正在使用这些 Bootstrap CSS 文件。是不是我用错版本了?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" integrity="sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" crossorigin="anonymous">
【问题讨论】:
-
您的链接指向引导程序版本 4,而您的项目中包含版本 3.3.5。也许这就是问题所在,v3.3.5 中不存在间距?
标签: css twitter-bootstrap-3 padding margins