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

탭메뉴 css 질문 드려요 채택완료

연댕댕 3년 전 조회 1,993

위 관련링크에 들어가면

second와 third 탭을 눌렀을 때 뜨는

하단 탭을  선택했을 때의 색을 하늘색이 아닌 다른색으로 바꾸고 싶은데

어떻게 해야 할지 모르겠어요 ㅠㅠㅠㅠㅠ

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

답변 1개

채택된 답변
+20 포인트
Kast
3년 전

</p>

<p>body{background:#f4f4f4}

.btn{padding:0;background:transparent;border:0;outline:0}

.clearfix::after{display:block;content:'';clear:both}</p>

<p>.tab_wrap{width:800px;margin:50px auto}

.tab_wrap .btn_tab{float:left;width:120px;height:30px;background:#fff;

  text-align:center;line-height:30px}

.tab_wrap .btn_tab.act{background:#9adce2;font-weight:bold}

.tab_wrap .content_area{display:none;width:100%;min-height:200px;padding:10px;background:#fff;border-radius:0 0 10px 10px;box-sizing:border-box}

.tab_wrap .content_area.act{display:block}

.tab_wrap *[data-depth="1"]{background:#f4f4f4}

//아래항목 추가

.tab_wrap .tab_area .btn_tab.act { background:yellow; }</p>

<p>

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

답변에 대한 댓글 5개

K
Kast
3년 전
저렇게 선택자로 아예 지정을하시는게 어떠실까요??
연댕댕
3년 전
제가 왕초보라 선택자로 지정한다는 게 어떤 말인지 더 설명해주실 수 있나요? ;ㅅ; ㅠㅠㅠ
연댕댕
3년 전
앗 아니에요 해결 됐어요!! 너무 감사드립니다
K
Kast
3년 전
css에서 사용되는 요소(element)를 선택하는 문법을 css 선택자라고합니다.

# << id값을 이용해 선택할때
[code]
<input type="text" id="mb_id">아이디</input>

#mb_id { font-size:11px; }

[/code]


. << class명을 이용해 선택할때
[code]
<div class="tab_wrap"></div>

.tab_wrap{width:800px;margin:50px auto}
[/code]


참고자료 : https://www.codingfactory.net/12644
연댕댕
3년 전
설명까지 너무 감사드려요 ><

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

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

로그인