부모 id class를 적용하여 같은 이름의 class에 다른 스타일 부여.
<style type="text/css">
#head {}
#head .basic_font{font-family:궁서; font-size:20px; color:red;}
#middle {}
#middle .basic_font{font-family:돋움; font-size:12px; color:green;}
#tail {}
#tail .basic_font{font-family:굴림; font-size:30px; color:orange;}
</style>
<div id="head">
<span class="basic_font">여기는 id:head class:basic_font</span>
</div>
<div id="middle">
<span class="basic_font">여기는 id:middle class:basic_font</span>
</div>
<div id="tail">
<span class="basic_font">여기는 id:tail class:basic_font</span>
</div>
부id가 상위 태그에 정의 되어 있을때, 중복 클래스네임도 다른 역할을 하게 할수있다.
페이지의 구조를 분석하여 부모 id를 잘정리를 하면 중복 class의 부담을 피해갈수있다.
즐거운 css
#head {}
#head .basic_font{font-family:궁서; font-size:20px; color:red;}
#middle {}
#middle .basic_font{font-family:돋움; font-size:12px; color:green;}
#tail {}
#tail .basic_font{font-family:굴림; font-size:30px; color:orange;}
</style>
<div id="head">
<span class="basic_font">여기는 id:head class:basic_font</span>
</div>
<div id="middle">
<span class="basic_font">여기는 id:middle class:basic_font</span>
</div>
<div id="tail">
<span class="basic_font">여기는 id:tail class:basic_font</span>
</div>
부id가 상위 태그에 정의 되어 있을때, 중복 클래스네임도 다른 역할을 하게 할수있다.
페이지의 구조를 분석하여 부모 id를 잘정리를 하면 중복 class의 부담을 피해갈수있다.
즐거운 css
[이 게시물은 관리자님에 의해 2011-10-31 16:54:41 CSS에서 이동 됨]
첨부파일
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6077 | 9년 전 | 156 | ||
| 6076 |
PlayPixel
|
9년 전 | 146 | |
| 6075 | 9년 전 | 162 | ||
| 6074 | 9년 전 | 218 | ||
| 6073 |
|
9년 전 | 180 | |
| 6072 |
|
9년 전 | 322 | |
| 6071 | 9년 전 | 225 | ||
| 6070 |
|
9년 전 | 261 | |
| 6069 | 9년 전 | 236 | ||
| 6068 |
|
9년 전 | 185 | |
| 6067 | 9년 전 | 200 | ||
| 6066 |
|
9년 전 | 315 | |
| 6065 |
PASKRAN
|
9년 전 | 208 | |
| 6064 | 9년 전 | 231 | ||
| 6063 |
kiplayer
|
9년 전 | 340 | |
| 6062 |
|
9년 전 | 271 | |
| 6061 | 9년 전 | 211 | ||
| 6060 |
|
9년 전 | 268 | |
| 6059 |
|
9년 전 | 211 | |
| 6058 |
|
9년 전 | 203 | |
| 6057 | 9년 전 | 253 | ||
| 6056 |
|
9년 전 | 206 | |
| 6055 |
|
9년 전 | 252 | |
| 6054 |
|
9년 전 | 230 | |
| 6053 |
snshero
|
9년 전 | 573 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기