<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
form {
width: 429px;
height: 409px;
background-color: aquamarine;
margin: 50px auto;
padding: 20px 0 0 12px;
box-sizing: border-box;
}
form input {
width: 262px;
height: 36px;
border: 1px solid #dddddd;
padding-left: 2px;
}
form th {
/* 去掉th自带加粗效果 */
font-weight: normal;
/* 水平居右 */
text-align: right;
}
form button {
width: 265px;
height: 40px;
border: 0;
background-color: #ff4a00;
color: #fff;
}
form .last {
text-align: right;
font-size: 12px;
}
form .last a {
color: #ff6600;
}
/* 公共类名td */
form .td {
/* 子绝父相 */
position: relative;
}
form .img {
position: absolute;
top: 5px;
right: 23px;
}
form .mes {
position: absolute;
top: 10px;
right: 15px;
text-decoration: none;
color: #333333;
font-size: 12px;
}
</style>
</head>
<body>
<form action="#">
<!-- 七行两列 -->
<table cellspacing="15">
<tr>
<th>手机:</th>
<td><input type="text" placeholder="请输入手机号"></td>
</tr>
<tr>
<th>创建密码:</th>
<td><input type="password" placeholder="请输入密码"></td>
</tr>
<tr>
<th>确认密码:</th>
<td><input type="password" placeholder="请再次输入密码"></td>
</tr>
<tr>
<th>验证码:</th>
<td class="td">
<input type="text" placeholder="请输入验证码">
<img src="./images/验证码.png" alt="" class="img">
</td>
</tr>
<tr>
<th>短信验证:</th>
<td class="td">
<input type="text" placeholder="请输入验证码">
<a href="#" class="mes">免费获取短信</a>
</td>
</tr>
<tr>
<th></th>
<td>
<button>注册</button>
</td>
</tr>
<tr>
<th></th>
<td class="last">已有账号,请<a href="#">登录</a></td>
</tr>
</table>
</form>
</body>
</html>