console
<div class="wrapper">
<h1 class="h1t">xxx账号注册</h1>
<form class="form1">
<div class="ipt-w">
<p>昵称</p>
<input class="ipt" type="text" required placeholder="请输入昵称" oninput="value=value.replace(/\s+/, '')" maxlength="32">
</div>
<div class="ipt-w">
<p>邮箱</p>
<input class="ipt" type="text" required placeholder="请输入邮箱地址" pattern="^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$">
</div>
<div class="ipt-w">
<p>手机号</p>
<input class="ipt" type="text" required placeholder="请输入手机号" pattern="0?(13|14|15|17|18)[0-9]{9}" maxlength="11">
</div>
<div class="ipt-w">
<p>姓名</p>
<input class="ipt" type="text" required placeholder="请输入真实姓名" pattern="[\u4e00-\u9fa5]+" maxlength="6">
</div>
<div class="ipt-w">
<p>身份证号</p>
<input class="ipt" type="text" required placeholder="请输入真实的身份证号" pattern="\d{17}[\d|x]|\d{15}" maxlength="18">
</div>
<div class="sb-btn-w">
<input class="btn sb-btn" type="submit" value="立即注册">
</div>
</form>
</div>
body,p,ol,ul,li,dl,dd,h1,h2,h3,h4,h5,h6,input,iframe,nav,header,footer {
margin: 0;
padding: 0;
list-style: none;
}
body {
font: 18px Microsoft YaHei,Arial,sans-serif;
-webkit-tap-highlight-color: rgba(50,50,50,.1);
line-height: 1.5;
color: #2a2b2c;
background: #fff;
}
*, *::before, *::after {
outline: none;
box-sizing: border-box;
}
a,img {
text-decoration: none;
display: block;
color: #2a2b2c;
border: 0;
}
input[type="text"],
input[type="submit"],
input[type="button"],
button,
textarea {
-webkit-appearance: none !important;
}
h1,h2,h3,h4,h5,h6 {
font: 18px Microsoft YaHei;
}
.h1t {
font-size: 24px;
text-align: center;
margin: 30px 0;
}
.ipt-w {
margin-bottom: 15px;
}
.ipt-w p {
margin-bottom: 5px;
padding: 0 15px;
}
input.ipt {
display: block;
width: 100%;
height: 40px;
padding: 0 15px;
font: 15px Microsoft YaHei;
color: #555;
border: 0;
border-top: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
background: #fff;
}
.ipt:focus {
border-top: 1px solid #0ce;
border-bottom: 1px solid #0ce;
}
.sb-btn-w {
margin: 30px 10px;
}
.btn {
display: block;
width: 100%;
height: 45px;
color: #fff;
background: #0d8;
text-align: center;
font: 16px/47px Microsoft YaHei;
border-radius: 2px;
padding: 0 10px;
border: 0;
outline: none;
cursor: pointer;
}
.btn:hover {
opacity: .9;
}