web/css
색, 텍스트, 글꼴
wefree
2023. 12. 21. 19:34
색
h2 {
color: palegreen;
background-color: plum;
}
p {
background: antiquewhite;
}
background 는 background-color 보다 기능이 다양하다. (예: 배경이미지 넣기 등)
텍스트
h2 {
text-align: center;
font-weight: 800;
text-decoration: blue underline;
letter-spacing: 10px;
}
p {
line-height: 2;
}
글꼴
h2 {
font-size: 80px;
font-family: Calibri, Arial, sans-serif, monospace;
}
- font-family 에서 지정된 글꼴 순으로 시스템에 있는 것을 찾아 지정한다.
- sans-serif, monospace 등은 generic family 인데, 여기에 속하는 폰트가 있으면 시스템에서 이걸 찾아 지정한다.