CSS ߿ (Selector) ֽϴ. (Selector) ־ CSS ֱ Դϴ. Ư CSS Ƿ (Selector) Ȯ ذ ̴ CSS Ȱ մϴ.
(Selector)
(Selector) Ʒ 4 ֽϴ.
- (Universal Selector)
- Ÿ (Type Selector)
- ID (ID Selector)
- Class (Class Selector)
(Universal Selector)
(Universal Selector) * ǥǴ Դϴ.
ϸ element color: gray; Ÿ Ѵٴ ǹԴϴ.
Ÿ (Type Selector)
Ÿ (Type Selector) p, div, span, table, td, form... HTML ± ϴ Դϴ.
̷ ϸ P element color: gray; Ÿ Ѵٴ ǹԴϴ.
ID (ID Selector)
#̶ þ ϸ鼭 element ̵ ָ ˴ϴ. Ư element Ÿ Ѵٴ ǹԴϴ.
#gray_text { color: gray; } |
ϸ id gray_text element Ÿ ˴ϴ.
Class (Class Selector)
.̶ þ ϸ鼭 element Ŭ ָ ˴ϴ. Ư element Ÿ Ѵٴ ǹ̷ ID ڿ ̶ Ŭ ̸ Ŭ ġص ̵ ؾ Ѵٴ ̰ ֽϴ.
.gray_text { color: gray; } |
ϸ Ŭ gray_text element Ÿ ˴ϴ.