테스트 사이트 - 개발 중인 베타 버전입니다

css에 메뉴에 대한 질문입니다. 채택완료

우주열차 6년 전 조회 1,948

css 왕초보입니다ㅠ

  ->       

현재 메뉴이구요                          이렇게 바꾸고싶습니다

 

메뉴 A-1을 누르거나 A-2를 누를때마다 밑에 검은메뉴들이 전체로 나오게 하고싶은데 어디 부분을 건드려야 될지 모르겠습니다 

 

html소스는 

     
             
  • A-1            
                                                                                       
             
  •          
  • A-2            
                                                                                       
             
  •        
     

 

css 소스는

.header{   font-weight: bold;   width: 100%;   height: 20px;   box-sizing: border-box; }

body{   list-style: none; }

.header ul {     float: right;     height: 100%;     width: 40%;     font-size: 20px; } .header li ul .nav_detail a:hover {     background: black;     color: white; } body, h1, h2, h3, ul, ol, li {     padding: 0;     margin: 0; } .header li ul .nav_detail a {     width: 100%;     height: 100%;     position: absolute;     top: 0;     left: 0;     color: #fff;     text-align: center;     text-decoration: none; } .header li ul .nav_detail {     position: relative;     text-align: left;     font-size: 14px;     font-weight: bold;     color: #fff;     background: black;     line-height: 40px;     list-style: none;     width: 100%;     height: 40px;     cursor: pointer;     z-index: 9999; } ul {     display: block;     list-style-type: disc;     margin-block-start: 1em;     margin-block-end: 1em;     margin-inline-start: 0px;     margin-inline-end: 0px;     padding-inline-start: 40px; } .header>ul>li:hover {     color: gray; } .header li:hover {     background-color: inherit; } .header li {     position: relative;     text-align: center;     list-style: none;     float: left;     line-height: 20px;     width: 10%;     color: #444444;     cursor: pointer; } .header li:hover > ul {     display: block; } .header li ul {     display: none;     position: relative;     z-index: 9999;     width: 100%;     z-index: 9999; }

이렇습니다  ㅠㅠㅠ 어디부분을 고쳐야될지 가르켜주시면 정말 감사하겠습니다

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
세크티
6년 전

 


붉은색볼드 표시한부분이 주석처리되거나 추가로넣은부분입니다.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

우주열차
6년 전
너무감사합니다ㅠㅠㅠ덕분에 배워갑니다
혹시 슬라이드로 마우스올렸을때 천천히 내려갔다가 마우스를 떼면 올라오게하려면 어디를 참고하거나 바꾸면 될까요?

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인