본문 바로가기
Site 만들기/header 유형

header 유형01

by 코터틀 2022. 9. 1.
반응형

사이트 만들기 : 헤더 유형01

사이트 만들기 - 헤더 유형입니다. 다른 유형보다 훨씬 간단하니 만들어보세요!

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>
        <nav 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>
        </nav>
        <div class="header__member">
            <a href="#">로그인</a>
        </div>
    </div>
</section>

CSS

web site 단어에 각각 다른 글자 속성을 지정하기 위해 site에 em태그를 사용하여 감싸주었습니다.
각 영역으로 연결시켜주기 위해 a태그를 사용하였고, 로그인 버튼도 만들었습니다.(아직 기능은 없어요!)

/* 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;
}

.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;
    transition: all 0.3s;
}

.header__member a:hover {
    background-color: #000;
    color: #fff;
}
반응형

댓글


광고 준비중입니다.