CSS 클래스를 혼용하여 박스 만드는 방법 > html

본문 바로가기

html

CSS 클래스를 혼용하여 박스 만드는 방법

작성일 08-08-20 13:38

페이지 정보

작성자서방님 조회 247회 댓글 0건

본문

<style>
.bordered {
        border: dotted 2px black;
        width: 180px;
        margin: 6px 3px 6px 3px;
        padding: 7px;
}
 
.type1 { background-color: #ffccff; }
.type2 { background-color: #ccffcc; }
.type3 { background-color: #ffffcc; }
.type4 { background-color: #ccccff; }
 
</style>

<div class="bordered type1">
        bordered와 type1 속성을 지정한 박스입니다.
</div>
<div class="bordered type2">
        bordered와 type2 속성을 지정한 박스입니다.
</div>
<div class="bordered type3">
        bordered와 type3 속성을 지정한 박스입니다.
</div>
<div class="bordered type4">
        bordered와 type4 속성을 지정한 박스입니다.
</div>

댓글목록

등록된 댓글이 없습니다.

게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기