글 수 10
| 대상회원 : |
|---|
문서 내용 중 태그에 적용된 class값을 정의할 때 사용되는 선택자이다.Class선택자는 표현할 때 Class명 앞에 .를 붙여서 구분 시킨다
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">.pt_style { font-size:9pt;color:#ff6600;font-weight:bold;"}
</style>
</head>
<body>
<table>
<tr><td><p class="pt_style"> 텍스트를 class로 style을 지정하는 형태입니다.</p></td></tr>
</table>
</body>
</html>
위 소스에서 태그에 class="pt_style" 라는 클래스가 적용되어있고 <head> 사이에 pt_style 에 대한 정의가 내려져 있다.따라서 위 본문에 적힌 텍스트는 폰트사이즈 9pt 에 폰트 색깔이 #ff6600, 그리고 폰트에 bold 속성이 지정되어 보이게 된다










CSS강좌

CSS강좌 
