Reset.css는 각 브라우저에 적용된 css 기본값을 초기화하는 것입니다.

reset.css를 적용하지 않으면 각 브라우저에서 다른 결과로 보일 수 있습니다.

 

그래서 reset.css는 필수적으로 입력 해주시는게 좋습니다.

 

입력하는 방법도 크게 어렵지 않습니다.

 

 

 

reset.css 영문 사이트(바로가기)

 

 

 

 

 

 

꼭 입력해야 하는 이유

 

 

 

CSS까지 끝마치고 웹사이트를 업로드 했는데 클라이언트에게 각기 다른 결과로 보일 수 있습니다.

힘겹게 간격을 맞췄는데 이러면 정말 힘이 빠지죠.

 

그렇기 때문에 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;
}

 

우선 위 태그를 복사합니다.

 

 

 

 

 

 Visual Studio Code로 reset.css파일 생성

 

원하는 폴더에 reset.css 파일을 만들고 안에 복사한 태그를 붙여넣기 합니다.

 

 

 

 

 

 

 

마지막으로 위 태그를 기존 작업 하는 CSS파일에 @import 하면 끝입니다.

반응형

+ Recent posts