위 관련링크에 들어가면
second와 third 탭을 눌렀을 때 뜨는
하단 탭을 선택했을 때의 색을 하늘색이 아닌 다른색으로 바꾸고 싶은데
어떻게 해야 할지 모르겠어요 ㅠㅠㅠㅠㅠ
답변 1개 / 댓글 5개
채택된 답변
+20 포인트
2021-11-29 (월) 23:32:32
Copy
body{background:#f4f4f4}
.btn{padding:0;background:transparent;border:0;outline:0}
.clearfix::after{display:block;content:'';clear:both}
.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; }
답변에 대한 댓글 5개
2021-11-29 (월) 23:42:04
제가 왕초보라 선택자로 지정한다는 게 어떤 말인지 더 설명해주실 수 있나요? ;ㅅ; ㅠㅠㅠ
2021-11-29 (월) 23:50:55
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
# << 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
답변을 작성하려면 로그인이 필요합니다.