css
w3schools.com
CSS : Cascading Style Sheets
CSS는 selector와 declaration block 으로 구성됨.
- element selector : html tag를 selector로 사용하는 경우임.
p { text-align:center; color:red; }
- id selector : id=”id_value” 가 사용된 경우임.
#id_value { text-align:center; color:red }
- class selector : class=”class_value” 가 사용된 경우임.
.class_value { text-align:center; color:red }
- group selector : 컴마(,) 로 구분해서 사용함.
h1, h2, p { text-align:center; color:red } .id1, .id2, .id3 { text-align:center; color:red }
- descendant selector : (space)로 구분해서 표현됨.
- child selector : (>)으로 구분해서 표현됨
- adjacent sibling selector : (+)로 구분해서 표현됨.
- general sibling selector : (~)로 구분해서 표현됨.
div p {background-color:red} /* div 안에 있는 모든 p 에 적용됨 */
div > p {background-color:yellow} /* div 안에 직계자식에 해당하는 모든 p 에 적용됨 */
div + p {background-color:blue} /* div 다음에 나오는 p 에 적용됨. */
div ~ p {background-color:orange} /* div 와 같은 부모를 갖는 모든 p에 적용됨. */
http://fontawesome.io/icons/