<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>用户注册</title>
<link type="text/css" rel="stylesheet" href="css/register.css">
</head>
<body>
<div>
<img class="tree" src="images/tree.jpg"/>
<form class="contact_form" action="#" method="post" name="contact_form">
<ul>
<li class="usually">
<h2>用户注册</h2>
</li>
<li class="usually">
<span>昵称:</span>
<input type="text" id="name" name="name" required />
</li>
<li class="usually">
<span>注册邮箱:</span>
<input type="email" name="email" placeholder="javin@example.com" required />
</li>
<li class="usually">
<span>密码:</span>
<input type="password" name="password" required />
</li>
<li class="special">
<span >性别:</span>
<input type="radio" name="sex" id="male" checked/>
<label for="male">男</label>
<input type="radio" name="sex" id="female" />
<label for="female">女</label>
</li>
<li class="usually">
<span>年龄:</span>
<input type="number" name="age" required/>
</li>
<li class="special">
<span >兴趣爱好:</span>
<input type="checkbox" id="football" name="interest" />
<label for="football">足球</label>
<input type="checkbox" id="basketball" name="interest" />
<label for="basketball">蓝球</label>
<input type="checkbox" id="swim" name="interest" />
<label for="swim">游泳</label>
<input type="checkbox" id="sing" name="interest" />
<label for="sing">唱歌</label>
<input type="checkbox" id="run" name="interest" />
<label for="run">跑步</label>
<input type="checkbox" id="yoga" name="interest" />
<label for="yoga">瑜伽</label>
</li>
<li class="usually">
<span>自我介绍:</span>
<textarea rows="10" cols="200" name="introduction" placeholder="Please enter your message"
class="message" required></textarea>
</li>
<li >
<button class="submit" type="submit">立即注册</button>
</li>
</ul>
</form>
</div>
</body>
</html>
*:focus {outline: none;}
.contact_form{
width: 70%;
position: absolute;
top: 20%;
left: 35%;
}
.tree{
position:relative;
top: 420px;
left: 260px;
}
.contact_form h2, .contact_form span {
font-family:Georgia, Times, "Times New Roman", serif;
}
.form_hint {font-size: 11px;}
.contact_form ul {
width:750px;
list-style: none;
margin:0px;
padding:0px;
}
.contact_form li{
padding:12px;
border-bottom:1px solid #eee;
position:relative;
}
.contact_form li:first-child,
.contact_form li:last-child {
border-bottom:1px solid #777;
}
.contact_form h2 {
margin:0;
}
.contact_form span {
width:150px;
margin-top: 3px;
display:inline-block;
padding:3px;
}
.usually input {
height:20px;
width:220px;
padding:5px 8px;
}
.contact_form textarea {padding:8px; width:300px;}
.contact_form button {margin-left:156px;}
.special input {
height:15px;
width:40px;
padding:5px 8px;
}
.usually input,
.usually textarea {
background: #fff url(../images/attention.png) no-repeat 98% center;
border:1px solid #aaa;
box-shadow: 0px 0px 3px #ccc, 0 10px 15px #eee inset;
border-radius:2px;
transition: padding .25s;
}
.usually input:focus,
.usually textarea:focus {
background: #fff;
border:1px solid #555;
box-shadow: 0 0 3px #aaa;
padding-right:70px;
}
button.submit {
background-color: #68b12f;
background: linear-gradient(top, #68b12f, #50911e);
border: 1px solid #509111;
border-bottom: 1px solid #5b992b;
border-radius: 3px;
box-shadow: inset 0 1px 0 0 #9fd574;
color: white;
font-weight: bold;
padding: 6px 20px;
text-align: center;
text-shadow: 0 -1px 0 #396715;
}
button.submit:hover {
opacity:.85;
cursor: pointer;
}
button.submit:active {
border: 1px solid #20911e;
box-shadow: 0 0 10px 5px #356b0b inset;
}
.usually input:focus:invalid,
.usually textarea:focus:invalid {
background: #fff url(../images/warn.png) no-repeat 98% center;
box-shadow: 0 0 5px #d45252;
border-color: #b03535
}
.usually input:required:valid,
.usually textarea:required:valid {
background: #fff url(../images/right.png) no-repeat 98% center;
box-shadow: 0 0 5px #5cd053;
border-color: #28921f;
}