首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >【CSS教程】简约渐变色登陆布局html+css代码

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

作者头像
NorthS
发布2023-03-21 20:52:14
发布2023-03-21 20:52:14
1.9K00
代码可运行
举报
文章被收录于专栏:北冥博客北冥博客
运行总次数:0
代码可运行

HTML

代码语言:javascript
代码运行次数:0
运行
复制
<!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

代码语言:javascript
代码运行次数:0
运行
复制
* {
  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;
}

温馨提示:本文最后更新于2021-11-18,若文件或内容有错误或已失效,请在下方留言

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年11月18日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • HTML
  • CSS
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档