码迷,mamicode.com
首页 > 其他好文 > 详细

块级div设置行宽,居中显示

时间:2019-09-27 16:33:01      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:jquer   输入密码   密码   title   center   form   OLE   highlight   pre   

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"> 
	<title>登录</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body >

<div class="page-header text-center">
  <h1>摄影
    <small>展会</small>
  </h1>
</div>
<!--居中设置 margin:0 auto;-->
<!--块级设置行宽 width:300px;--> <div style="background:green;margin:0 auto;width:300px;"> <form role="form" > <table class="table" style="width:400px"> <tbody > <tr> <div class="form-group"> <td> <label for="name">名称</label> </td> <td> <input type="text" class="form-control" id="name" placeholder="请输入名称" style="width:200px"> </td> </div> </tr> <tr> <div class="form-group"> <td> <label for="name">密码</label> </td> <td> <input type="password" class="form-control" id="name" placeholder="请输入密码" style="width:200px"> </td> </div> </tr> <tr> <td> <button type="submit" class="btn btn-default">提交</button> </td> <td> <button type="submit" class="btn btn-default">注册</button> </td> </tr> </tbody> </table> </form> </div> </body> </html>

 

块级div设置行宽,居中显示

标签:jquer   输入密码   密码   title   center   form   OLE   highlight   pre   

原文地址:https://www.cnblogs.com/xhk123/p/11598713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!