답변 1개 / 댓글 5개
채택된 답변
+20 포인트
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개
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
답변을 작성하려면 로그인이 필요합니다.