Web/CSS
[CSS] 리셋 css 파일 / reset css
eunyoe
2019. 10. 31. 11:36
반응형
리셋 css / reset css란?
모든 웹 브라우저에서 동일하게 보이기 위해서 사용하는 것으로,
브라우저 자체의 css style을 리셋시켜주는 css이다.
크로스 브라우징을 위해서는 *필수적인* 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;
사용방법
위의 reset.css를 외부 문서로 저장하여 <head> 사이에 link를 넣어주면 된다.
<head>
<link rel="stylesheet" href="경로/reset.css">
<head>
반응형