pho*_*ong 18 html javascript css meteor bootstrap-4
在本文中,我看到了Bootstrap 4 Spacing Utility Classes,他使用m-b-lg了className.
<div class="row">
<div class="col-sm-6 m-b-lg">
<!-- column-small-50%, margin-bottom-large -->
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
但是当我在meteorjs上使用它时,没有任何反应.我错过了什么或丢失了插件吗?
<div className="container-fluid">
<div className="col-xs-6 col-xs-offset-3 m-t-lg">
<h1 className="text-xs-center"> Login </h1>
<form>
<div className="form-group">
<input type="email" className="form-control" id="inputEmail" placeholder="Email"/>
</div>
<div className="form-group">
<input type="password" className="form-control" id="inputPassword" placeholder="Password"/>
<p className="text-xs-center"><a href="/signup"> Forgot your email or password?</a></p>
</div>
<div className="form-group">
<button className="btn btn-primary btn-block" type="submit"> Login </button>
<p className="text-xs-center"> New to Arcademy? <a href="/signup"> Sign up now.</a></p>
</div>
</form>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
Zim*_*Zim 60
更新2018 Bootstrap 4
自原始答案(对于v4 alpha),Bootstrap 4 间距工具已更改.现在语法很简单:
例子..
mb-2=边距底部2间距单位
m-0=无边距
pt-3=填充顶部3间距单位
p-1=填充所有边1个间距单位
现在有6种尺寸(0-6)代表标准.5rem间隔单元的一部分.此外,还添加了x轴(左/右)和y轴(顶部/底部)工具:
my-2=保证金顶部和底部2间隔单位
mx-0=无边距左右
px-3=填充左右3个间距单位
并且,间距工具现在响应.xs当没有使用断点时,隐含最小断点.
mt-md-2=保证金前2个间隔单位,开md(和上)
py-sm-0=没有填充顶部和底部,开sm(和上)
Bootstrap 4 Spacing Utils Demo