본문 바로가기
Web/HTML&CSS

[CSS] Reset

by juein 2020. 6. 11.

자주 사용하는 CSS 리셋 코드

커스텀 영역은 입맛대로 변경하자. (body의 font-family 라던가..)

@charset 'UTF-8';

/* basic reset */
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{border:0;font-size:100%;margin:0;padding:0}
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,select{display:block}
ol,ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
table{width:100%;border-collapse:collapse;border-spacing:0}
img{vertical-align:top;outline:none;border:none}
iframe,textarea{vertical-align:top}
address{font-style:normal}

/* custom */
h2, h3, h4, h5{font-weight:600;word-break:keep-all}
strong{font-weight:600}
*{box-sizing:border-box}
video{object-fit:cover}

body{font-family: sans-serif;line-height:1.4;letter-spacing:-0.075em;background:#fff}

h2{font-size:50px;letter-spacing:-1px;line-height:1.2;color:#1d1d1d}
h2 span{font-weight:300}
h2 + p{font-size:19px;line-height:1.6}

section{position:relative;background-color:#fff;z-index:1}
a{text-decoration:none}
em{font-style:normal}
button{padding:0;border:0 none;cursor:pointer}
p{word-break:keep-all}
i{font-style:normal}
.hide{position:absolute;width:0;height:0;overflow:hidden;font:0/0 Sans-serif;visibility:hidden}
:focus{outline:none}

'Web > HTML&CSS' 카테고리의 다른 글

[CSS] SCSS_기본 사용법  (0) 2020.06.11
HTML 전역 속성 사용하기  (0) 2019.03.25
[CSS] Koala를 사용하여 LESS / SASS 를 CSS 파일로 컴파일  (0) 2019.03.25

댓글