【CSS教程】简约渐变色登陆布局html+css代码

HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="css/style.css">
  <title>简约渐变色登陆页-墨吻网络</title>
</head>
<body>
  <div class="container">
    <div class="login-wrapper">
      <div class="header">登陆</div>
      <div class="form-wrapper">
        <input type="text" name="username" placeholder="用户名" class="input-item">
        <input type="password" name="password" placeholder="密码" class="input-item">
        <div class="btn">登陆</div>
      </div>
      <div class="msg">
        没有账号? <a href="#">点击注册</a>
      </div>
    </div>
  </div>
</body>
</html>

CSS

* {
  padding: 0;
  margin: 0;
  font-family: 'Open Sans Light';
  letter-spacing: .05em;
}
html {
  height: 100%;
}
body {
  height: 100%;
}
.container {
  height: 100%;
  background-image: linear-gradient(to right,#fbc2eb,#a6c1ee);
}
.login-wrapper{
  background-color: #fff;
  width: 250px;
  height: 500px;
  border-radius: 15px;
  padding: 0 50px;
  position: relative;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
}
.login-wrapper .header {
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  line-height: 200px;
}
.login-wrapper .form-wrapper .input-item {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  border: 0;
  padding: 10px;
  border-bottom: 1px solid rgb(128, 125, 125);
  font-size: 15px;
  outline: none;
}
.login-wrapper .form-wrapper .input-item::placeholder {
  text-transform: uppercase;
}
.login-wrapper .form-wrapper .btn {
  text-align: center;
  padding: 10px;
  width: 100%;
  margin-top: 40px;
  background-image: linear-gradient(to right,#a6c1ee,#fbc2eb);
  color: #fff;
}
.login-wrapper .msg {
  text-align: center;
  line-height: 80px;
}
.login-wrapper .msg a {
  text-decoration-line: none;
  color: #a6c1ee;
}
图片[1]-【CSS教程】简约渐变色登陆布局html+css代码-北冥博客
温馨提示:本文最后更新于2021-11-18,若文件或内容有错误或已失效,请在下方留言
© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容