4,547,267 th visitor since 2017.2.1 ( Today : 3659 )
Programming
No. 782
Name. swindler
Subject. id, class의 차이
Main Cate. CSS
Sub Cate.
Date. 2017-01-17 15:13
Hit. 2058 (211.36.27.3)
File.
id는 한 페이지에 하나의 정의로 하나의 태그만 사용할 수 있다.
즉, 로고/메뉴/footer 같은 스타일을 정의할때 사용한다.

반면에 class를 반복적으로 사용되는 스타일을 정의할 수 있다.

<style type="text/css">
.center {
text-align:center;
}

#footer {
clear: both;
background-colod: #3d3d3d;
}

</style>


<div class="center"> aaaaa </div>
<div class="center"> aaaaa </div>

<div id="footer"> .... </div>

[바로가기 링크] : http://coolx.net/cboard/develop/782



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog