我正在使用less
并试图让最后一个输入的边距底部为10px
. 这是我所拥有的,但它不起作用,并且没有在最后一个输入上应用 margin-bottom 。任何想法为什么?
input {
margin-bottom: 0px;
&:last-child {
margin-bottom: 10px;
}
}
和 HTML
<form id="auth-form">
<input id="ember367" class="ember-view ember-text-field" placeholder="Email" type="email" name="email">
<input id="ember368" class="ember-view ember-text-field" placeholder="Password" type="password" name="password">
<div class="clear"></div>
<a class="pull-left forgot-password">Forgot password?</a>
<button class="pull-right" data-ember-action="1" type="button">Sign In</button>
</form>