gpt4 book ai didi

twitter-bootstrap - Bootstrap mr-auto 不起作用

转载 作者:行者123 更新时间:2023-12-04 07:44:09 24 4
gpt4 key购买 nike

我正在使用 bootstrap4 ,这是我的代码,我添加了类 mr-auto在复选框行中,所以我认为 New use?Sign up now!应该是正确的,但它没有,有什么问题?

<h1 class="text-center">Log in</h1>
<div class="row">
<div class="col-md-6 offset-md-3">
<form action="/login" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="bhbKzszsGeADlAPkfoW4U58mGd9zfOy9mIl62R/gODqAFXevFsmTj//StPsLnrf8XpNlpkR+BHY6pgxlSlh8Og==" />
<div class="form-group">
<input type="text" name="email" id="email" class="form-control" placeholder="用户名/Email" autofocus="autofocus" />
</div>
<div class="form-group">
<input type="password" name="password" id="password" class="form-control" placeholder="password" />
</div>
<input type="submit" name="commit" value="login" class="btn btn-primary btn-block" data-disable-with="login" />

<div class="form-check mt-2 mr-auto d-inline-block">
<label class="form-check-label p-0">
<input type="checkbox" name="remember_me" id="remember_me" value="{:class=&gt;&quot;form-check-input &quot;}" /> Remember me
</label>
</div>
<p class=" d-inline-block">New user?<a href="/signup">Sign up now!</a></p>
</form>
</div>
</div>

最佳答案

它不对齐,因为自动边距不适用于 inline-block元素。使用float-right反而..

<form action="/login" accept-charset="UTF-8" method="post">
<input name="utf8" type="hidden" value="✓">
<input type="hidden" name="authenticity_token" value="bhbKzszsGeADlAPkfoW4U58mGd9zfOy9mIl62R/gODqAFXevFsmTj//StPsLnrf8XpNlpkR+BHY6pgxlSlh8Og==">
<div class="form-group">
<input type="text" name="email" id="email" class="form-control" placeholder="用户名/Email" autofocus="autofocus">
</div>
<div class="form-group">
<input type="password" name="password" id="password" class="form-control" placeholder="password">
</div>
<input type="submit" name="commit" value="login" class="btn btn-primary btn-block" data-disable-with="login">

<div class="form-check mt-2 d-inline-block">
<label class="form-check-label p-0">
<input type="checkbox" name="remember_me" id="remember_me" value="{:class=>&quot;form-check-input &quot;}"> Remember me
</label>
</div>
<p class="float-right mt-2 d-inline-block">New user?<a href="/signup">Sign up now!</a></p>
</form>

http://www.codeply.com/go/0XCESDWKdG

关于twitter-bootstrap - Bootstrap mr-auto 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43122541/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com