[즐겨찾기] reset.css

괴발·2022년 12월 26일
0

📍상시확인용

목록 보기
4/8

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;
}

reset.css 만드는 법
1. 내가 작업하고 있는 폴더에 적당한 이름의 css 파일(예reset.css)을 만들고 위 코드를 붙여넣는다.
2. reset.css 파일을 저장하고, 최상단의 css에 import한다. (예
@import "reset.css";)

대충 코드설명
margin, padding, border 없애고
font-size 내가 정한대로 나오게 하고
여튼 브라우저별 개별설정을 초기화 하도록 해두는 reset.css
필요한 내용만 뽑아다 써도 되고 여기에 더 추가해도 된다.

profile
괴발개발

0개의 댓글