bootstrap1
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<title>로그인 폼</title>
</head>
<body>
<div class="my1">
<div class="card">
<img src="다운로드.jpg" class="rounded-circle mx-auto my2" alt="Cinque Terre" width="100" height="100">
<form>
<div class="form-group">
<label>E-mail</label>
<input type="email" placeholder="Email을 입력하세요" class="form-control">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" placeholder="Password를 입력하세요" class="form-control">
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="checkbox" class="custom-control-input" id="customCheck" name="example1">
<label class="custom-control-label" for="customCheck">Remember E-mail</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default form-control login_style">로그인</button>
</div>
</form>
</div>
</div>
<style>
body {
width: 100%;
height: 100%;
margin: 0;
}
.card {
width: 30rem;
border-radius: 2rem;
padding: 2rem;
background-color: yellow;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.login_style {
background-color: saddlebrown;
color: white;
}
/* 화면 중앙배치 */
.my1 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
-webkit-align-items: center;
-webkit-justify-content: center;
-webkit-box-pack: center;
-webkit-box-align: center;
-moz-box-pack: center;
-moz-box-align: center;
-ms-box-pack: center;
-ms-box-align: center;
}
.my2 {
margin-bottom: 3rem;
}
.checkbox_style {
width: 1rem;
height: 1rem;
background: blue;
}
</style>
</body>
</html>
댓글
댓글 쓰기