728x90
๋ฐ์ํ
CSS ์คํ์ผ ์ ๊ฑฐ
: reset CSS
(๊ธฐ๋ณธ ์คํ์ผ ์ง์ฐ๊ธฐ)
โ ์ํฉ
→ html ํ๊ทธ์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ ์ฉ๋๋ ๋ธ๋ผ์ฐ์ ๊ธฐ๋ณธ ์คํ์ผ์ ์ ๊ฑฐ ํ๊ณ ์ถ์ ๋
โ ๋ฐฉ๋ฒ
→ css์์ ์คํ์ผ์ ์ ๊ฑฐํ๋ ์ฝ๋๋ฅผ ์ ์ฉํด์ค๋๋ค.
โ ์์
→ htmlํ์ผ ์์ฑ
→ reset css ์ฝ๋๋ฅผ ์์ฑ
→ reset.css ํ์ผ์ ์ ์ฒด style.css ํ์ผ์ import
๐ข HTML์ CSS ํ์ผ ์ฐ๊ฒฐ
→ ์ ๋ ๋ณดํต style.css ํ์ผ์ ๋ง๋ค์ด ์ ์ฉ๋๋ css ํ์ผ์ ์ฌ๊ธฐ์ ๋ชจ์ import ํฉ๋๋ค!
<link rel="stylesheet" href="../common/css/style.css">
๐ข style.css ํ์ผ์ import ํ๊ธฐ
@charset "UTF-8";
/* ์ ๋ ๋ณดํต reset์ฝ๋๋ฅผ common.css์ ๋ชจ์์ค๋๋ค*/
@import url("common.css");
๐ข css ํ์ผ์ reset ์ฝ๋ ์์ฑํ๊ธฐ
/* common.css file */
@charset "UTF-8";
/* reset */
*{margin:0;padding:0; font-family:'Noto Sans', 'Noto Sans Korean'; -webkit-text-size-adjust: none; -moz-text-size-adjust: none; -ms-text-size-adjust: none;}
html, body {width:100%; height:100%; margin:0; padding:0; font-family:'Noto Sans', 'Noto Sans Korean', 'Nanum Gothic', Nanum Gothic, '๋๋๊ณ ๋', Dotum, '๋์', Gulim, '๊ตด๋ฆผ',sans-serif; -webkit-text-size-adjust: none; -moz-text-size-adjust: none; -ms-text-size-adjust: none; }
body{font-size:16px; word-break:break-all;-ms-word-break:break-all; line-height:1.1;}
a, address, blockquote, br, fieldset, legend, label, form, input, select, textarea, button, table, th, td caption, cite, code, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, div, iframe, ul, ol, li, hr, img{margin:0; padding:0;}
h1, h2, h3, h4, h5, h6 {font-size:16px; text-align:left;}
ul, ol, li {list-style:none;}
abbr,acronym {border:0;}
img{vertical-align:middle; border:none;}
img, fieldset, iframe{border:none;}
em, address{font-style:normal;}
textarea{overflow:auto;}
table{border-collapse:collapse; border-spacing:0;}
input, select, textarea{font-size:100%; vertical-align:middle;}
select{font-size: inherit; font-family: inherit; color: inherit;text-transform: none;vertical-align: middle; box-sizing:border-box; appearance: none; -webkit-appearance: none; -moz-appearance: none; -o-appearance: none;}
button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 0;
border: none;
background: none;
}
/* hyper link */
a,
a:link,
a:visited{text-decoration:none;}
a:active,
a:hover{text-decoration:none;}
/* hidden content */
.skip{font-size: 1px; height: 1px; line-height: 1px; overflow: hidden; position: absolute; text-indent: 4px; white-space: nowrap; width: 1px;}
/* hr , legend , caption */
hr, legend, caption{clear:both; display:none; list-style:none; position:absolute; top:0; left:0; width:0; height:0; margin:0; padding:0; border:0; background:none; font-size:0px; line-height:0; visibility:hidden;}
/* clear */
.clear{*zoom:1;}
.clear:after{content:""; clear:both; display:block;}
/*hidden*/
.hidden {
display : none;
}
/* flex */
.flex {
display: flex;
}
@charset "UTF-8";
/* reset.css */
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;
}
728x90
๋ฐ์ํ
'๐ปCoding > ๐ CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[css] css background : transparent ๋? | background : none ์ด๋ ์ฐจ์ด์ (0) | 2022.09.02 |
---|---|
[css] CSS ์ด๋ฏธ์ง ์๋ ์ฌ๋ผ์ด๋ ๋ง๋ค๊ธฐ : ํ๋ฌ๊ฐ๋ ์ด๋ฏธ์ง (0) | 2022.08.29 |
[CSS] html aํ๊ทธ ์คํ์ผ ์์ ๊ธฐ : css ์คํ์ผ ์ง์ฐ๊ธฐ (0) | 2022.08.21 |
CSS _์ปฌ๋ฌ_color (0) | 2021.11.23 |
CSS _ํฐํธ(font)_font-weight (0) | 2021.11.22 |