POST提交登录可用登录框代码

POST提交登录可用登录框代码

woodchen
2022-12-06 / 0 评论 / 5 阅读 / 正在检测是否收录...

HTML

<div class="login-box">
  <form  id="login_form" action="https://tms.czl.net/signin.htm" method="post" autocomplete="off" target="_blank">
    <div class="user-box">
      <input type="text" required="required" id="username" maxlength="50" name="username" >
      <label>账号</label>
    </div>
    <div class="user-box">
      <input type="password" id="password" name="password"  required="required">
      <label>密码</label>
    </div>
    <button class="czl_tms_loginbutton" type="submit" >登录</button>
  </form>
</div>

CSS

.login-box {
  position:absolute;
  box-sizing: border-box;
  margin-left:auto; 
  margin-right:auto;
  width: 100%;
}
.login-box .user-box {
  position: relative;
}
.login-box .user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: rgb(0, 0, 0);
  margin-bottom: 30px;
  border: none;
  border-bottom: 1px solid rgb(0, 0, 0);
  outline: none;
}
.login-box .user-box label {
  position: absolute;
  top:0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: rgb(0, 0, 0);
  pointer-events: none;
  transition: .5s;
}
.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label {
  top: -20px;
  left: 0;
  color: rgb(37,111,183);
  font-size: 12px;
}
.czl_tms_loginbutton{
  width:100%;
border-radius: 4px; 
  padding: 9px;
  text-align: center;
  font-size: 13px;
  color:rgb(255, 255, 255);
  background-color: rgb(37,111,183);
  display: block; 
margin-bottom: 10px;  
line-height: 20px;
  margin-bottom: 10px; 
  border: 1px solid #808080;
  outline:none;
}
0

评论 (0)

取消