홈페이지를 만들때, HTML, CSS 마크업 작업 후
CSS 코드를 짜기 전, 해야할 작업이 있습니다.
바로 초기화 작업인데요
각기의 브라우져들이 갖고있는 CSS초기값이 다 다르기때문에
이를 통일화할 필요성이 있기 때문입니다.
만약 이를 통일화하지않는다면 각기 브라우져에서 보여지는 CSS값이 달라지므로
홈페이지 화면 구현에 어려움이 있겠죠
그래서 오늘 살펴볼 주제는
CSS작업시 초기화하는 방법입니다
1. Reset CSS
https://meyerweb.com/eric/tools/css/reset/
CSS Tools: Reset CSS
CSS Tools: Reset CSS The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're inter
meyerweb.com
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;
}
2. Normalize.css
https://necolas.github.io/normalize.css/
Normalize.css: Make browsers render all elements more consistently.
Normalize.css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.
necolas.github.io
다운받아서 파일을 index.html에 연결하여 사용합니다.
'CSS' 카테고리의 다른 글
bootstrap 으로 웹페이지 손쉽게 꾸미기 (0) | 2021.08.20 |
---|---|
fullpage 전체페이지 스크롤 플러그인 (0) | 2021.08.17 |
Font Awesome 사용 메뉴얼 (0) | 2021.08.05 |
CSS position 속성 정리 (0) | 2021.08.03 |
댓글