작업 일지/HTML CSS

[CSS] Reset 리셋

AI랑노는 또또 2023. 7. 5. 09:45

작업자 마다 다르고,

프로젝트 마다 다른 나만의 css reset 입니다. 

참고만 하세요.

 

/* Reset */
* { background-repeat: no-repeat; }
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body, p, h1, h2, h3, h4, h5, h6, ul, ol, li, dl, dt, dd, table, th, td, form, fieldset, legend, input, textarea, button, select {-webkit-text-size-adjust: 100%;}
li, dd { list-style-type : none;  }
em, address { font-style: normal; }
form { margin: 0; padding: 0; }
table { border-collapse : collapse; }
img { border: 0; -ms-interpolation-mode: bicubic; }

a[href], input[type='submit'], input[type='image'], label[for], select, button, .pointer { cursor: pointer; }
::-moz-selection { background: #B34EB8; color: #fff; text-shadow: none; }
::selection { background: #B34EB8; color: #fff; text-shadow: none; }
svg:not(:root) { overflow: hidden; }
.reset, .reset li { margin: 0; padding: 0; list-style: none; } /* reset */

a{color:#222;text-decoration:none}
a:hover{color:#390;text-decoration:none}
button *{position:relative}
button img{left:-3px;*left:auto}
html:first-child select{height:20px;padding-right:6px}
option{padding-right:6px}
hr{display:none}
legend{*width:0}

table{border-collapse:collapse;border-spacing:0;zoom:1;}
caption{text-indent:-999em;font-size:0;line-height:0;white-space:nowrap;overflow:hidden;caption-side:top;}
.clear:after {display:block;content: '';clear:both;}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display: block;}
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }


/* html5속성 선언 ie8용 */
article,aside,canvas,details,figcaption,figure, footer,header,hgroup,menu,nav,section,summary {display:block;}

/* 제목 글꼴 크기 설정 */
h1 img, h2 img, h3 img,h4 img, h5 img, h6 img {margin: 0; padding:0;}

/* IR */
.ir_wa {display:block;overflow:hidden;position:relative;z-index:-10;width:100%;height:100%} /* 중요한 이미지 대체텍스트로 이미지off시에도 대체 텍스트를 보여주고자 할때 */
.ir_pm {display:block;overflow:hidden;font-size:0px;line-height:0;text-indent:-9999px} /* 사용된 이미지내 의미있는 텍스트의 대체텍스트를 제공할때 */
.blind {display:block;overflow:hidden;position:absolute;top:-1000em;left:0} /* 대체텍스트가 아닌 접근성을 위한 숨김텍스트를 제공할때 */