각각의 브라우저들은 서로 다른 렌더링 방식을 가지고 있어서
같은 css 로도 서로 다르게 보이게 됩니다.
이를 방지하기 위해 각 엘리먼트들을 초기화한 후 작업을 진행하면 됩니다.
아래는 제가 사용하는 css 디폴트 소스입니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* css 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 { 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; }
|
'html,css,js' 카테고리의 다른 글
timepicker with Swiper.js (1) | 2021.06.29 |
---|---|
JS - toggle 버튼 구현 (0) | 2021.06.28 |
[css] -webkit-padding, -webkit-margin (1) | 2021.05.20 |
HTML의 시작[Visual Studio Code 설치 및 실행] (1) | 2018.11.20 |