html – Bootstrap水平表单不起作用

html – Bootstrap水平表单不起作用,第1张

概述我正在尝试为我的laravel应用程序构建一个带引导程序的简单水平表单.这是我正在使用的代码.但它显示如下: 表单显示在页面的左半部分.有任何想法吗?优选地,表格应该在页面上居中. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /><div c 我正在尝试为我的laravel应用程序构建一个带引导程序的简单水平表单.这是我正在使用的代码.但它显示如下:

表单显示在页面的左半部分.有任何想法吗?优选地,表格应该在页面上居中.

<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水平表单不起作用所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1058169.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-25
下一篇2022-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存