CSS 디자인
CSS 초기화
박금향
2023. 9. 6. 16:43
/*내가 Pretendard Available을 많이 써서 넣어놓은 부분*/
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable.css");
/*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%;
vertical-align: baseline;
box-sizing: border-box;
}
/* 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;
}
button {background-color: unset; border: none; color: #fff;}
canvas {width: 100% !important;}
* {font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; box-sizing: border-box;}
*::after, *::before {box-sizing: border-box;}
#container {display: flex; width: 100%;}
뭐 이렇게까지...? 싶은 부분들도 꽤 들어있긴 함.
2024.08.08 추가
Pretendard Variable 대신 GOV를 사용 + CSS 초기화 세팅 약간
/*Pretendard GOV 폰트 불러오기*/
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-gov.min.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, button {
margin: 0;
padding: 0;
border: 0;
font-family: "Pretendard GOV Variable", "Pretendard GOV", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
vertical-align: baseline;
color: inherit;
}
/*스크롤바*/
::-webkit-scrollbar {
width: 10px;
background-color: transparent;
}
/*스크롤바 트랙*/
::-webkit-scrollbar-track {
background-color: transparent;
}
/*스크롤바 핸들*/
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 5px;
}
/*스크롤바 마우스 호버 시 핸들*/
::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.5);
}
*, html {
scroll-behavior: smooth !important;
}
html {
font-size: 62.5%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1.5;
min-height: 100vh;
}
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;
}
a {
text-decoration: none;
}
:root {
-webkit-tap-highlight-color:transparent;
-webkit-text-size-adjust:100%;
text-size-adjust:100%;
cursor:default;
line-height:1.5;
overflow-wrap:break-word;
-moz-tab-size:4;
tab-size:4;
}
img, picture, video, canvas, svg {
display: block;
max-width:100%;
}
button {
background-color: unset;
cursor: pointer;
}
:root {
/*컬러팔레트 구성*/
}