1
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="css/login.css">
<title>登陆</title>
</head>
<body>
<main class="main" role="main">
<div class="container">
<div class="row">
<div class="offset-md-3 col-md-6">
<form class="form-container">
<h2>登陆</h2>
<div class="form-group">
<label for="exampleInputEmail1">用户名</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="请输入用户名">
</div>
<div class="form-group">
<label for="exampleInputPassword1">密码</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="请输入密码">
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">记住信息</label>
</div>
<button type="submit" class="btn btn-success btn-block">登录</button>
</form>
</div>
</div>
</div>
</main>
<div class="footer">
<div class="container">
登录页面 @2020年5月10日
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
完整的代码:https://download.csdn.net/download/mingzi1245/12406211
2.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>login</title>
</head>
<body>
<div>
<div>
<!-- 左上角部分 -->
<div class="chrome">
<span>欢迎</span>
<span>使用</span>
</div>
</div>
<!-- 中间部分 -->
<div class="center">
<!-- 登陆框 -->
<div class="user">
<p class="cuser">账号登录</p>
<!-- 用户名密码及登录按钮部分 -->
<div class="form">
<div class="user1">
<img src="images/user.png" alt="">
<input type="text" placeholder="邮箱">
</div>
<div class="user2">
<img src="images/passwd.png" alt="">
<input type="password" placeholder="密码">
</div>
<div>
<button type="button">马上登录</button>
</div>
</div>
<div style="height: 25px;"></div>
<div class="mima">
<p class="jz">
<input type="checkbox" class="box">
<span>记住密码</span>
</p>
<p class="wj">忘记密码?
<a href="#">立即找回</a>
</p>
</div>
</div>
</div>
<!-- 底部部分 -->
<div class="foot">
<p class="banquan">
2020年5月10日
</p>
</div>
</div>
</div>
</body>
</html>
完整的代码:https://download.csdn.net/download/mingzi1245/12406208
3
html代码
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>后台管理系统</title>
</head>
<body>
<div class="logo_box"><img class="logo_img" src="images/login_logo.png"></div>
<div class="login_box">
<h1 class="title">欢迎登录</h1>
<input class="input_box" type="text" placeholder="用户名">
<input class="input_box" type="password" placeholder="密码">
<input class="button_box" type="button" value="登录">
</div>
</body>
</html>
css代码
body {
background-color: #8ea4f8;
background-image: url(images/background.jpg);
background-repeat: no-repeat;
background-size: cover; //背景图适应屏幕
}
.login_box {
width: 400px;
height: 400px;
background-color: #fff;
margin: auto;
margin-top: 150px;
border-radius: 5px;
overflow: hidden;//.title设置margin-top无效,给父元素设置overflow:hidden;
}
.title {
text-align: center;
font-size: 28px;
color: #000;
margin-top: 80px;
margin-bottom: 10px;
letter-spacing: 3px;
font-family: sans-serif;
}
.input_box {
width: 300px;
height: 30px;
width: 300px;
height: 40px;
padding-left: 10px;
margin-top: 20px;
margin-left: 50px;
}
.button_box {
width: 300px;
height: 35px;
width: 300px;
height: 40px;
margin-top: 20px;
margin-left: 50px;
border-radius: 5px;
background-color: #64a9d9;
cursor: pointer;
color: #fff;
}
.logo_box {
position: absolute;
background-color: #fff;
width: 100px;
height: 100px;
border-radius: 100px;
top: 100px;
left: 46%;
border: solid 5px #A68364;
text-align: center;
}
.logo_img {
margin-top: 20px;
}
完整的代码:https://download.csdn.net/download/mingzi1245/12406204