일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- til
- 로켓펀치 #취준컴퍼니 #취업 #일상 #취준생
- 다중 catch 블록
- throws 키워드
- 실행 예외
- 예외
- 일반 예외
- 코딩테스트준비
- try-catch-finally 블록
- 항해99
- 99클럽
- 예외 처리
- 개발자취업
- 예외클래스
Archives
- Today
- Total
innn
Reset CSS과 css분리(divide & conquer) 본문
리셋 CSS 를 복사 붙여넣기해서 웹 브라우저에 디폴트로 깔린 모든 CSS를 없애준다.
https://cssdeck.com/blog/scripts/eric-meyer-reset-css/
Eric Meyer’s “Reset CSS” 2.0 | CSS Reset
One of the pioneers of the method, Eric Meyer's CSS Reset is still in use on millions of websites today. Find it and others, with full guides and docs, on CSSReset.com
cssdeck.com
리셋할 코드는 아래와 같다.
이를 복사 붙여넣기해서 reset.css 파일을 만들어 넣어준다.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
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, 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,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html 파일에 링크로 넣지 않고, css를 이용해 추가하는 것이 좋다
임포트문 뒤에 넣어주면 된다.
html 파일에 링크를 여러개 하는 것보다 css에 추가해주는 것이 더 좋은 방법이다.
status-bar에 적용한 css들도 하나의 css파일로 빼서 import 문으로 넣어준다.
styles.css 파일은 다른 css 파일을 추가하는 파일로 쓰는 것이다.
이를, css 파일을 여러개로 분할했다가 합치는 것이다 (divide & conquer)
그중 status-bar를 분리시킨 이유는, 모든 페이지는 status-bar를 가지고 있기 때문이다.
'FE > HTML CSS 자바 스크립트' 카테고리의 다른 글
헤더 css 넣어주기 (0) | 2022.08.27 |
---|---|
display: flex와 text-align:center 차이점 (0) | 2022.08.27 |
구글 폰트와 css hack(justify-content 대신 사용) (0) | 2022.08.27 |
헤더 넣기 (0) | 2022.08.27 |
아이콘 넣기 (0) | 2022.08.27 |