본문 바로가기
SITE

헤더 타입 01

by 코빈_ 2022. 9. 1.

헤더 타입 구조 01

사이트에 기초적인 구조를 가진 헤더 타입 구조를 만들어 봤습니다.

Site HTML

사이트를 코딩하는 데에 필요한 HTML의 구조를 잡아줍니다.

    <section id="headerType" class="header__wrap nexon">
        <div class="header__inner">
            <div class="header__logo">
                <a href="#">web<em>site</em></a>
            </div>
            <div class="header__menu">
                <ul>
                    <li><a href="#">헤더 영역</a></li>
                    <li><a href="#">슬라이드 영역</a></li>
                    <li><a href="#">배너 영역</a></li>
                    <li><a href="#">컨테이너 영역</a></li>
                    <li><a href="#">푸터 영역</a></li>
                </ul>
            </div>
            <div class="header__member">
                <a href="#">로그인</a>
            </div>
        </div>
    </section>

Site CSS

사이트를 코딩하는 데에 필요한 css의 구조를 잡아줍니다.
h2와 p는 전체 구역에 사용돼 코드 불안정한 가능성이 있기에, 해당 요소 css만 부여되는 >를 사용해줍니다.

    /* fonts */
    @import url('https://webfontworld.github.io/NexonLv1Gothic/NexonLv1Gothic.css');
    .nexon {
        font-family: 'NexonLv1Gothic';
        font-weight: 400;
    }
    /* reset */
    * {
        margin: 0;
        padding: 0;
    }
    a {
        text-decoration: none;
        color: #000;
    }
    img {
        width: 100%;
    }
    h1, h2, h3, h4, h5, h6 {
        font-weight: normal;
    }
    em, i ,address {
        font-style: normal;
    }
    /* common */
    .container {
        width: 1160px;
        padding: 0 20px;
        margin: 0 auto;
        min-width: 1160px;
    }
    .section {
        padding: 120px 0;
    }
    .section > h2 {
        font-size: 50px;
        line-height: 1;
        text-align: center;
        margin-bottom: 20px;
    }
    .section > p {
        font-size: 22px;
        font-weight: 300;
        color: #666;
        text-align: center;
        margin-bottom: 70px;
    }

    /* headerType */
    .header__inner {
        width: 100%;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-sizing: border-box;
        border-bottom: 1px solid #ccc;
    }
    .header__logo {
        width: 20%;
        font-size: 30px;
        font-weight: 700;
        text-transform: uppercase;
    }
    .header__logo em {
        font-size: 18px;
        font-weight: 400;
        font-style: normal;
    }
    .header__menu {
        width: 60%;
        text-align: center;
    }
    .header__menu li {
        display: inline;
    }
    .header__menu li a {
        padding: 13px 30px;
        margin: 0 5px;
        transition: background-color 0.3s;
    }
    .header__menu li a:hover {
        background-color: #f1f1f1;
        border-radius: 5px;
    }
    .header__member {
        width: 20%;
        text-align: right;
    }
    .header__member a {
        font-size: 16px;
        border: 1px solid #000;
        padding: 10px 30px;
        border-radius: 50px;
    }
    .header__member a:hover {
        background-color: #000;
        color: #fff;
    }


결과물

'SITE' 카테고리의 다른 글

슬라이드 타입 01  (3) 2022.09.05
이미지 텍스트 타입 01  (7) 2022.09.01
텍스트 타입 03  (2) 2022.08.31
텍스트 타입 02  (1) 2022.08.31
텍스트 타입 01  (4) 2022.08.30

INFORMATION

javascript

css

html