작은숲:위키노트/CSS

큰숲백과, 나무를 보지 말고 큰 숲을 보라.
(위키노트:CSS에서 넘어옴)

활용

나열된 객체의 짝수번째, 홀수번째 선택자

tr:nth-child(odd) { background-color:#fbfbfb; }
tr:nth-child(even) { }

속성 선택자

input[type="text"], input[name="value"] { border:1px solid #ccc; padding:4px 4px; border-radius:3px; outline:none; }
input[type="checkbox"] { position:relative; top:2px; margin-right:4px; }

나눔고딕 글꼴 크기

body {
    font-size: 13px;
    font-family: 'Segoe UI', /*'Meiryo UI',*/ NanumGothic, NanumBarunGothic, 'Malgun Gothic', Dotum, 'Apple SD Gothic Neo', AppleGothic, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

글꼴 크기를 15px로 할 때는 나눔바른고딕이 나은 것 같고, 13px로 할 때는 나눔고딕이 나은 것 같다.

글꼴을 나눔고딕으로 할 때 제목 등 굵은 글꼴 깔끔하게

h1 { font-weight:800; }
h2 { font-weight:600; }

문서 제목은 font-weight800 정도 해주는 것이 적당하고, 본문 제목의 경우는 600 정도로 해주는 것이 좋다.

같이 보기

참고