• 카테고리

    질문 & 답변
  • 세부 분야

    웹 개발

  • 해결 여부

    미해결

PC에서 모바일화면으로 전환되면 GNB 메뉴가 OPEN되어있는 상태 (소스)4

24.02.16 11:57 작성 조회수 72

2

@media (max-width:768px) {
  /* html { 
    scroll-behavior: smooth;
  }
  */

  /* Entire Layout */
  .cd-section {
    height: auto;
  }
  .cd-section > div {
    height: auto;
  }
  .content {
    position: static;
    width: 100%;
    height: 100%;
  }
  /* Header */
  header {
    transition: 0.5s;
    z-index: 100;
  }
  header.active {
    background-color: #fff;
    border-bottom: 1px solid #eee;
  }
  .menu {
    display: block;
  }
  .slogan {
    display: none;
  }
  .gnb {
    background-color: #fff;
    position: fixed;
    top: 0;
    right: -270px;
    width: 250px;
    height: 100vh;
    box-shadow: -5px  0 10px rgba(0, 0, 0, 0.1);
    transition: 0.5s;
  }
  .gnb.active {
    right:0;
  }
  .menu {
    margin-top: 60px;
    line-height: 40px;
  }
  .menu a {
    display: block;
    text-align: right;
    padding-right: 20px;
    color: #000;
    font-size: 20px;
  }
  
  /* Trigger */
  .trigger {
    display: block;
    width: 24px;
    height: 14px;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  .trigger span {
    position: absolute;
    height: 1px;
    width: 100%;
    background-color: #000;
    transition: 0.5s;
  }
  .trigger span:nth-child(1) {
    top: 0;
  }
  .trigger span:nth-child(2) {
    top: 50%;
    width: 80%;
  }
  .trigger span:nth-child(3) {
    top: 100%;
  }
  .trigger.active span:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
  }
  .trigger.active span:nth-child(2) {
    top: 50%;
    width: 80%;
    opacity: 0;
  }
  .trigger.active span:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
  }

  /* go to top */
  .gototop {
    position: fixed;
    bottom: 20px;
    left: 20px;
    border: 1px solid #fff;
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    transform: translateY(0px);
    opacity: 0;
  }
  .gototop.active {
    opacity: 1;
  }
  .btn-hiring {
    right: 20px;
    bottom: 20px;
  }
  .cd-vertical-nav {
    display: none;
  }
  
  /* Show Hide Section */
  /* #home,
  #about,
  #project,
  #plan,
  #awards,
  #location,
  #contact { 
    display: none;
  }
  */

  /* ############# section : Home ############# */
  .home-inner {
    height: 100vh;
  }
  .welcome-text {
    transform: translate(-50%, -50%) scale(0.7);
    width: 100%;
    /* border: 2px solid red; */
  }
  .home-heading {
    left: 20px;
  }
  .home-heading span {
    font-size: 50px;
  }

}

답변 1

답변을 작성해보세요.

0

첫번째 질문에 답변 올렸습니다. 확인해주세요~

audlovewns님의 프로필

audlovewns

질문자

2024.02.19

감사합니다 :)