只用html的情况下,怎么将用户名、密码、手机号这些对齐?还有后面的框框也对齐?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
<style>
.top{
text-align: center;
}
.center{
text-align: center;
}
</style>
</head>
<body>
<div class="top">
<h1>注册界面</h1>
</div>
<hr/>
<div class="center" >
<form>
用户名:<input type="text" name="username" placeholder="zhangsan"><br/><br/>
密码:<input type="password" name="pwd" placeholder="123456"/><br><br>
手机号:<input type="tel" name="tel" placeholder="+86"/><br><br>
邮箱:<input type="email" name="email" placeholder="@qq.com"><br><br>
性别: 男:<input type="radio" name="sex"/> 女:<input type="radio" name="sex"/><br><br>
爱好:<input type="checkbox" />唱歌
<input type="checkbox" /> 睡觉
<input type="checkbox" /> LOL
<br>
<input type="checkbox" /> 旅游
<input type="checkbox" /> 高尔夫
<input type="checkbox" /> 篮球
<br><br>
籍贯:<select >
<option>--请选择</option>
<option>中国</option>
<option>俄国</option>
<option>法国</option>
<option>德国</option>
</select>
<br><br>
个人介绍:<textarea rows="10" cols="10" ></textarea>
<br><br>
<input type="checkbox" />是否同意协议
<br><br>
<input type="submit" value="提交"/>
</form>
</div>
</body>
</html>
@FishC_GPT |