220927 transition_fulldown.html

2022. 9. 27. 12:22·Skills/CSS3, SCSS
<!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.0" />
    <title>full down menu</title>
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
      integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
    />
    <style>
      /*-------- default setting --------*/
      * {
        margin: 0;
        padding: 0;
      }
      a {
        color: black;
        text-decoration: none;
      }
      li {
        list-style: none;
      }
      img {
        display: block;
      }

      /*-------- header --------*/
      .header {
        width: 1032px;
        height: 200px;
        background-color: #ccc;
        margin: 0 auto;
      }

      /*-------- lnb --------*/
      #chk_menu {
        display: none;
      }
      #chk_menu:checked ~ .menu_box {
        height: 300px;
      }
      /* #chk_menu ~ .menu_box {display: none;} */

      .lnb {
        width: 1032px;
        margin: 0 auto;
        position: sticky;
        top: 0;
      }
      .lnb .menu label {
        float: left;
      }
      .lnb .menu ul {
        float: left;
      }
      .lnb .menu li {
        width: 206.4px;
        height: 32px;
        background-color: #8b0000;
        color: white;
        text-align: center;
        line-height: 32px;
        float: left;
      }
      .lnb .menu_box {
        width: 1032px;
        height: 0;
        overflow: hidden;
        transition-property: height;
        transition-duration: 0.2s;
      }

      /*-------- wrap --------*/
      .wrap {
        width: 1032px;
        height: 2000px;
        background-color: #ccc;
        margin: 0 auto;
      }

      /*-------- wing banner --------*/
      #wing_banner {
        display: none;
      }

      #wing_banner:checked ~ .wing_box {
        width: 200px;
      }
      /* #wing_banner ~ .wing_box {display: none;} */

      #wing_banner:checked ~ .banner .close {
        display: block;
      }
      #wing_banner:checked ~ .banner .open {
        display: none;
      }
      #wing_banner ~ .banner .close {
        display: none;
      }
      #wing_banner ~ .banner .open {
        display: block;
      }

      .wing {
        display: block;
        width: 50px;
        height: 50px;
        background-color: #8b0000;
        color: white;
        font-weight: bold;
        text-align: center;
        line-height: 50px;
        position: fixed;
        right: 0;
        top: 50px;
      }
      .wing .wing_box {
        width: 0;
        height: 300px;
        float: right;
        color: black;
        background-color: #eee;
        transition-property: width;
        transition-duration: 0.2s;
      }

      /*-------- top button --------*/
      .top {
        display: block;
        width: 50px;
        height: 50px;
        background-color: #8b0000;
        color: white;
        font-weight: bold;
        text-align: center;
        line-height: 50px;
        position: fixed;
        right: 50px;
        bottom: 50px;
      }
    </style>
  </head>
  <body>
    <header class="header">
      <h1 id="header">Header</h1>
    </header>

    <nav class="lnb">
      <input type="checkbox" id="chk_menu" />
      <div class="menu">
        <label for="chk_menu">
          <img src="./images/ham_btn.png" alt="풀다운메뉴 버튼" />
        </label>
        <ul>
          <li>menu01</li>
          <li>menu02</li>
          <li>menu03</li>
          <li>menu04</li>
          <li>menu05</li>
        </ul>
      </div>

      <div class="menu_box">menu_box</div>
    </nav>

    <div class="wrap">contents</div>

    <nav class="wing">
      <input type="checkbox" id="wing_banner" />
      <div class="banner">
        <label for="wing_banner" class="open"
          ><i class="fa-sharp fa-solid fa-angle-left"></i
        ></label>
        <label for="wing_banner" class="close"
          ><i class="fa-sharp fa-solid fa-xmark"></i
        ></label>
      </div>

      <div class="wing_box">wing_banner</div>
    </nav>

    <a href="#header" class="top">Top</a>
  </body>
</html>

'Skills > CSS3, SCSS' 카테고리의 다른 글

221011 mobile.html  (0) 2022.10.11
220928 transition_box.html  (1) 2022.09.28
220927 transition.html  (0) 2022.09.27
220927 transform.html  (0) 2022.09.27
220926 naver_news.html  (0) 2022.09.26
'Skills/CSS3, SCSS' 카테고리의 다른 글
  • 221011 mobile.html
  • 220928 transition_box.html
  • 220927 transition.html
  • 220927 transform.html
개발자 윤구나
개발자 윤구나
개발 공부를 하고 있습니다. Let's go!
  • 개발자 윤구나
    이것은 무엇?????
    개발자 윤구나
    • 분류 전체보기
      • Skills
        • Java
        • Database
        • Flutter, Dart
        • JavaScript
        • React
        • HTML5
        • CSS3, SCSS
        • PHP
        • C#
        • Unity
        • Algorithm
        • GIT·GitHub
        • 그 외
      • Book Review
      • IT NEWS
      • 설계
      • 자기 계발
  • 블로그 메뉴

    • 홈
    • 방명록
  • 인기 글

  • 최근 글

  • 최근 댓글

  • 전체
    오늘
    어제
  • hELLO· Designed By정상우.v4.10.3
개발자 윤구나
220927 transition_fulldown.html
상단으로

티스토리툴바