注册页面
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>注册页面</title>
<style>
.p{
color:red;
margin-left:20px;
display:inline-block;
}
.c{
color:red;
margin-left:4px;
display:inline-block;
}
.l{
font-size:18px;
}
.d{
height:35px;
width:300px;
display:inline;
}
.i{
height:30px;
width:300px;
}
.container
{
width: 70%;
margin: 10% auto 0;
background-color: #f0f0f0;
padding: 2% 5%;
border-radius: 10px;
position: absolute;
top: 50%;
left: 50%;
width: 100px;
height: 500px;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div style="height: 80px;"></div>
<form enctype="multipart/form-data">
<div style="width:500px;float:left;margin:0 20px;" class="container">
<div style="font-size:28px;">注册新用户</div>
<br/>
<span class="p">*</span>
<label for="username" class="l">用户名:</label>
<div style="height:35px;width:300px;position:relative;display:inline;">
<input id="username" type="text" style="height:30px;width:250px;padding-right:50px;">
<span style="position:absolute;right:18px;top:2px;background-image:url(user.ico);height:16px;width:16px;display:inline-block;" ></span>
</div>
<br/><br/>
<span class="p">*</span>
<label for="phonenumber" class="l">手机号:</label>
<div class="d">
<input id="phonenumber" type="text" class="i">
</div>
<br/><br/>
<span class="c">*</span>
<label for="login_password" class="l">登录密码:</label>
<div class="d">
<input id="login_password" type="text" class="i">
</div>
<br/><br/>
<span class="c">*</span>
<label for="confirm_password" class="l">确认密码:</label>
<div class="d">
<input id="confirm_password" type="text" class="i">
</div>
<br/><br/>
<span class="p">*</span>
<label for="ver_code" class="l">验证码:</label>
<div class="d">
<input id="ver_code" type="text" class="i">
</div>
<br/><br/>
<input type="checkbox" name="agree" style="margin-left:100px;display:inline-block;" value="1"/>
<span style="font-size:10px;">我已阅读并同意《用户注册协议》</span>
<br/><br/>
<input type="submit" value="同意以上协议并注册" style="margin-left:100px;height:30px;width:300px;display:inline-block;"/>
</div>
</form>
</body>
</html>
效果:
登录页面
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
登录页面
</title>
</meta>
<style>
.container
{
width: 70%;
margin: 10% auto 0;
background-color: #f0f0f0;
padding: 2% 5%;
border-radius: 10px
}
h1{
text-align: center;
}
</style>
</head>
<body>
<div style="height:80px;"></div>
<div style="width:500px;float: middle;margin:0 auto;" class="container">
<h1>登录</h1>
<label for="username" style="font-size:18px">
用户名:
</label>
<div style="height:35px;width:400px;position:relative;display:inline">
<input id="username" style="height:30px;width:350px;padding-right:50px;" type="text">
<span style="position:absolute;right:18px;top:2px;background-image:url(user.ico);height:16px;width:16px;display:inline-block;">
</span>
</input>
</div>
<br/>
<br/>
<label for="password1" style="font-size:18px">
密码:
</label>
<div style="height:35px;width:400px;position:relative;display:inline">
<input id="password1" style="height:30px;width:350px;padding-right:50px;" type="text">
<span style="position:absolute;right:16px;top:2px;background-image:url(p.ico);height:16px;width:16px;display:inline-block;">
</span>
</input>
</div>
<br>
<br>
<div style="width:426px;float: middle;">
<input name="auto_login" type="radio" value="1"/>
自动登录
<a herf="找回密码网址">
忘记密码?
</a>
<a href="http://111.229.210.226/04.html">
注册
</a>
</div>
<br/>
<br/>
<div style="width:426px">
<a href="http://111.229.210.226/02.html"><input style="height:30px;width:200px;" type="submit" value="登录"/></a>
</div>
</input>
</div>
</body>
</html>
效果: