차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판 | ||
tech:css [2015/05/21 16:47] – [pt px em % 변환] V_L | tech:css [2016/07/12 09:26] (현재) – 바깥 편집 127.0.0.1 | ||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | {{tag> | ||
======CSS (Cascading Style Sheet) | ======CSS (Cascading Style Sheet) | ||
CSS(Cascading Style Sheet)는 마크업 언어가 실제 표시되는 방법을 기술하는 언어로, HTML과 XHTML에 주로 쓰이며, XML에서도 사용할 수 있다. W3C의 표준이며, | CSS(Cascading Style Sheet)는 마크업 언어가 실제 표시되는 방법을 기술하는 언어로, HTML과 XHTML에 주로 쓰이며, XML에서도 사용할 수 있다. W3C의 표준이며, | ||
줄 15: | 줄 16: | ||
+ | * [[CSS 초기화]] - CSS 간섭을 없앨때 사용. | ||
+ | * [[CSS 말줄임 사용]] | ||
+ | * [[Css 둥근테두리 사용]] | ||
http:// | http:// | ||
http:// | http:// | ||
+ | |||
- | * <p style=" | ||
- | * <p style=" | ||
- | * <p style=" | ||
- | * < | ||
- | * < | ||
- | * < | ||
- | * | ||
- | * | ||
- | * | ||
- | * < | ||
- | * < | ||
- | * <p style=" | ||
- | * | ||
- | * {white-space: | ||
- | =====ellipsis===== | ||
- | |||
- | <file css> | ||
- | max-width: 100px; | ||
- | text-overflow: | ||
- | white-space: | ||
- | overflow: hidden; | ||
- | </ | ||
- | |||
- | =====CSS 초기화 (Clearing; Reset)===== | ||
- | 여러 소스를 짜집기 할 때 서로 영향을 주는 경우 사용한다. | ||
- | <code css> html, body, div, span, applet, object, iframe, | ||
- | h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
- | a, abbr, acronym, address, big, cite, code, | ||
- | del, dfn, em, font, img, ins, kbd, q, s, samp, | ||
- | small, strike, strong, sub, sup, tt, var, | ||
- | b, u, i, center, | ||
- | dl, dt, dd, ol, ul, li, | ||
- | fieldset, form, label, legend, | ||
- | table, caption, tbody, tfoot, thead, tr, th, td { | ||
- | margin: 0; | ||
- | padding: 0; | ||
- | border: 0; | ||
- | outline: 0; | ||
- | vertical-align: | ||
- | background: transparent; | ||
- | }</ | ||
- | |||
- | 아니면 다음과 같은 파일을 사용할 수도 있다. | ||
- | |||
- | <file css reset.css >html, body, div, span, applet, object, iframe, | ||
- | h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
- | a, abbr, acronym, address, big, cite, code, | ||
- | del, dfn, em, font, img, ins, kbd, q, s, samp, | ||
- | small, strike, strong, sub, sup, tt, var, | ||
- | dl, dt, dd, ol, ul, li, | ||
- | fieldset, form, label, legend, | ||
- | table, caption, tbody, tfoot, thead, tr, th, td { | ||
- | margin: 0; | ||
- | padding: 0; | ||
- | border: 0; | ||
- | outline: 0; | ||
- | font-weight: | ||
- | font-style: inherit; | ||
- | font-size: 100%; | ||
- | font-family: | ||
- | vertical-align: | ||
- | } | ||
- | /* remember to define focus styles! */ | ||
- | :focus { | ||
- | outline: 0; | ||
- | } | ||
- | body { | ||
- | line-height: | ||
- | color: black; | ||
- | background: white; | ||
- | } | ||
- | ol, ul { | ||
- | list-style: none; | ||
- | } | ||
- | /* tables still need ' | ||
- | table { | ||
- | border-collapse: | ||
- | border-spacing: | ||
- | } | ||
- | caption, th, td { | ||
- | text-align: left; | ||
- | font-weight: | ||
- | } | ||
- | blockquote: | ||
- | q:before, q:after { | ||
- | content: ""; | ||
- | } | ||
- | blockquote, q { | ||
- | quotes: "" | ||
- | }</ | ||
=====background===== | =====background===== | ||
left top | left top | ||
줄 122: | 줄 37: | ||
center bottom | center bottom | ||
- | =====둥근 테두리===== | ||
- | ie9, 파폭, 크롬 등에서 지원함. | ||
- | <code css> | ||
- | /* 왼쪽위 */ | ||
- | | ||
- | -webkit-border-top-left-radius: | ||
- | -moz-border-radius-topleft: | ||
- | border-top-left-radius: | ||
- | | ||
- | /* 왼쪽아래 */ | ||
- | -webkit-border-bottom-left-radius: | ||
- | -moz-border-radius-bottomleft: | ||
- | border-bottom-left-radius: | ||
- | / | ||
- | -webkit-border-top-right-radius: | ||
- | -moz-border-radius-topright: | ||
- | border-top-right-radius: | ||
- | /*오른쪽 아래*/ | ||
- | -webkit-border-bottom-right-radius: | ||
- | -moz-border-radius-bottomright: | ||
- | border-bottom-right-radius: | ||
- | </ | ||
===== 마진, 패딩 & 박스크기 ===== | ===== 마진, 패딩 & 박스크기 ===== | ||
줄 180: | 줄 73: | ||
[참조] [[http:// | [참조] [[http:// | ||
- | ====줄이기 (...) ==== | ||
- | <file css> | ||
- | .ellipsis { width: 150px; text-overflow: | ||
- | </ | ||
=====display===== | =====display===== | ||
줄 195: | 줄 84: | ||
보이지만 않고 해당 공간은 존재. width와 height값을 주었다면 그만큼 공간은 존재하게 됨 | 보이지만 않고 해당 공간은 존재. width와 height값을 주었다면 그만큼 공간은 존재하게 됨 | ||
- | ====Float 탈출==== | ||
- | 부모 div에 '' | ||
=====< | =====< | ||
아직도 작동하지만 웹표준에서 삭제되었다. CSS를 이용한 정렬이 권장된다. | 아직도 작동하지만 웹표준에서 삭제되었다. CSS를 이용한 정렬이 권장된다. | ||
줄 220: | 줄 107: | ||
- | {{tag> | + |