인스타그램 로그인페이지 FE 클론코딩

bible_k_·2023년 2월 26일
0

HTML, CSS만 사용한 인스타그램 로그인 페이지 FE 클론코딩

HTML 코드

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>로그인_instagram</title>

    <link rel="stylesheet" href="login.css">
    <link rel="stylesheet" href="reset.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css">
</head>
<body>
    <div class="wrap">
        <section id="formSection">
            <div class="header">
                <img class="logo" width="160" src="https://blog.kakaocdn.net/dn/b5QczF/btrehC6dzmX/7VS9KZZIkBlYV2GKnuUGCK/img.png" alt="">
                <form action="" class="form">
                    <input type="text" class="input-style" placeholder="전화번호, 사용자 이름 또는 이메일" required>
                    <input type="password" class="input-style" placeholder="비밀번호" required minlength="8">
                    <input type="submit" class="login" value="로그인">
                </form>
            </div>
            <div class="divider">
                <div>
                    <hr class="hr-style">
                </div>
                <span>
                    또는
                </span>
                <div>
                    <hr class="hr-style">
                </div>
            </div>
            <div class="facebook">
                    <button class="facebooklogin">
                        <i class="bi bi-facebook" style="margin-right: 0.5em; font-size: 18px;"></i><span>Facebook으로 로그인</span>
                    </button>
                    <a class="findpassword" href="">비밀번호를 잊으셨나요?</a>
            </div>
        </section>
    </div>
</body>
</html>


CSS 코드

.wrap {
    width: 100vw;
    height: 100vh;
    
    background-color: white;

    display: flex;
    justify-content: center;
    align-items: center;
}

#formSection {
    background-color: white;
    border: 1px solid #c6c6c6;
    max-width: 330px;
    min-width: 330;
    padding: 10px 40px;
    text-align: center;
}
.header {
    display: flex;
    flex-direction: column;
    width: 260px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 40px;
}

.form {
    width: 260px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.input-style {
    padding: 9px 0px 7px 8px;
    background-color: rgb(250, 250, 250);
    color: rgb(38, 38, 38);
    font-size: 16px;
    margin-bottom: 7px;
    border: 1px solid lightgray;
    border-radius: 3px;
}

.input-style::placeholder {
    font-size: 12px;
}

.input:active, input:focus {
    outline: none;
    border-color: hsl(0, 0%, 71%);
}

.login {
    background-color: rgb(0, 149, 246);
    font-weight: bold;
    border: none;
    color: white;
    width: 100%;
    border-radius: 8px;
    font-size: 14px;
    padding: 7px 16px;
    margin: 10px auto;
}

.divider {
    width: 260px;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    grid-template-rows: 1fr;
    margin: 15px auto;

    font-size: 13px;
    font-weight: bold;
    color: rgb(142, 142, 142);
}

.hr-style {
    height: 1px;
    background-color: lightgray;
    border: none;
}

.facebook {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.facebooklogin {
    font-size: 14px;
    color: rgb(56, 81, 133);
    font-weight: bold;
    background-color: transparent;
    border: none;
}

.findpassword {

    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    color: rgb(0, 55, 107);
    text-decoration: none;
}
profile
후론트엔드 개발자

0개의 댓글