简单表单框架

代码展示

 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
 <title>表单样式</title>
 <style type="text/css">
 * {
 font-size: 12px;
 margin: 0;
 padding: 0;
 }
  
 input {
 width: 320px;
 height: 24px;
 border: 1px solid #999;
 border-radius: 4px;
 }
  
 .formErr {
 border: 1px solid red;
 }
  
 .form .label {
 display: block;
 float: left;
 width: 128px;
 height: 40px;
 line-height: 40px;
 text-align: end;
 }
  
 .form .txt {
 display: block;
 float: left;
 width: 340px;
 height: 40px;
 line-height: 40px;
 padding-left: 16px;
 }
  
 .form button {
 width: 56px;
 height: 24px;
 background-color: green;
 border: 0;
 border-radius: 4px;
 color: white;
 }
  
 .form .errTips {
 width: 226px;
 background-color: lightpink;
 color: darkred;
 border-radius: 4px;
 margin-left: 144px;
 margin-top: 6px;
 margin-bottom: 4px;
 padding: 16px 48px;
 }
 </style>
 </head>
 <body>
 <div class="form">
 <div>
 <span class="label">用户名</span>
 <span class="txt"><input type="text" placeholder="6-20个字符"/></span>
 </div>
 <div style="clear: both"></div>
 <div>
 <span class="label">密码</span>
 <span class="txt"><input type="password" placeholder="6-20个字符" class="formErr"/></span>
 </div>
 <div style="clear: both"></div>
 <div>
 <span class="label">重复密码</span>
 <span class="txt"><input type="password" placeholder="再次输入密码"/></span>
 </div>
 <div style="clear: both"></div>
 <div class="errTips">
 <ul>
 <li>密码长度不能小于6个字符!</li>
 <li>密码不能为空!</li>
 <li>两次密码输入不一致!</li>
 </ul>
 </div>
 <div style="clear: both"></div>
 <div>
 <span class="label"></span>
 <span class="txt"><button>提交</button></span>
 </div>
 <div style="clear: both"></div>
 </div>
 </body>
 </html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值