木子晓晓
2016-04-07 16:53
</head>
<body>
<form method="post" action="save.php">
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" />
<br/>
<label for="pass"> 密码 :</label>
<input type="password" name="pass" id="pass" value="" />
<br/>
<input type="submit" value="确定" name="submit" />
<input type="reset" value="重置" name="reset" />
</form>
</body>
<body>
<form method="post" action="save.php">
<div align="center">
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" />
<br/>
<label for="pass"> 密码 :</label>
<input type="password" name="pass" id="pass" value="" />
<br/>
<div align="center">
<input type="submit" value="确定" name="submit" />
<input type="reset" value="重置" name="reset" />
</div>
</div>
</form>
</body>
<style type="text/css">
div{
text-align:center;
}
</style>
…
<div>
<input type="submit" value="确定" />
<input type="reset" value="重置" />
</div>
input{margin-left:30px;}
加个div 给div写样式 margin:auto;
用<center>或者在前面添加空格 
初识HTML(5)+CSS(3)-升级版
1225306 学习 · 18230 问题
相似问题