gpt4 book ai didi

html - Bootstrap 模态形式太丑了

转载 作者:行者123 更新时间:2023-11-28 04:50:42 25 4
gpt4 key购买 nike

我需要帮助,我无法弄清楚为什么我的模态登录表单不符合任何更改并且看起来不像标准的 Bootstrap 表单。

导航.php

<!-- Modal HTML -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Login</h4>
</div>
<div class="modal-body">
<p>Please log in below</p>
<form action="#" method="post" accept-charset="UTF-8">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
<label class="label" for="user" style="color: black">Username</label></br>
<input id="user" type="text" name="user" size="30" class="input-large" placeholder="username" required/>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
<label class="label" for="pass"style="color: black">Password</label></br>
<input id="pass" type="text" name="pass" size="30" class="input-large" placeholder="Password"required/>
</div>
</div>
<label class="string optional" for="user_remember_me"> Remember me</label> <input id="user_remember_me" style="float: left; margin-right: 10px;" type="checkbox" name="user[remember_me]" value="1" />

<input class="btn btn-success" style="clear: left; width: 100%; height: 32px; font-size: 13px; margin-bottom: 6px;" type="submit" name="submit" value="submit" />
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

这是它的样子 enter image description here

这是我希望它看起来像的示例 enter image description here

最佳答案

The documentation是你的 friend 。表单、输入及其标签需要附加 form-groupform-control(以及其他类)。

<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
</div>
</form>

关于html - Bootstrap 模态形式太丑了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32975812/

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