
表单显示在页面的左半部分.有任何想法吗?优选地,表格应该在页面上居中.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/CSS/bootstrap.min.CSS" /><div > <form > <fIEldset> <!-- Form name --> <legend>Register</legend> <!-- Text input--> <div > <label for="name">name</label> <div > <input ID="name" name="name" placeholder="name" required="" type="text"> </div> </div> <!-- Text input--> <div > <label for="email">Email</label> <div > <input ID="email" name="email" placeholder="Email" required="" type="email"> </div> </div> <!-- Password input--> <div > <label for="password">Password</label> <div > <input ID="password" name="password" placeholder="Password" required="" type="password"> </div> </div> <!-- Password input--> <div > <label for="password_confirmation">Confirm Password</label> <div > <input ID="password_confirmation" name="password_confirmation" placeholder="Re-enter Password" required="" type="password"> </div> </div> <!-- button --> <div > <label for="submit"></label> <div > <button ID="submit" name="submit" >Register</button> </div> </div> </fIEldset> </form></div>解决方法 你可以尝试这样:
<script src="https://AJAX.GoogleAPIs.com/AJAX/libs/jquery/3.2.1/jquery.min.Js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/Js/bootstrap.min.Js"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/AJAX/libs/twitter-bootstrap/3.3.7/CSS/bootstrap.min.CSS" /><div ><div > <div > <form > <fIEldset> <!-- Form name --> <legend>Register</legend> <!-- Text input--> <div > <label for="name">name</label> <div > <input ID="name" name="name" placeholder="name" required="" type="text"> </div> </div> <!-- Text input--> <div > <label for="email">Email</label> <div > <input ID="email" name="email" placeholder="Email" required="" type="email"> </div> </div> <!-- Password input--> <div > <label for="password">Password</label> <div > <input ID="password" name="password" placeholder="Password" required="" type="password"> </div> </div> <!-- Password input--> <div > <label for="password_confirmation">Confirm Password</label> <div > <input ID="password_confirmation" name="password_confirmation" placeholder="Re-enter Password" required="" type="password"> </div> </div> <!-- button --> <div > <label for="submit"></label> <div > <button ID="submit" name="submit" >Register</button> </div> </div> </fIEldset> </form> </div></div>总结
以上是内存溢出为你收集整理的html – Bootstrap水平表单不起作用全部内容,希望文章能够帮你解决html – Bootstrap水平表单不起作用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)