기본 HTML소스에 적용되어있는 css속성들을 초기화 하여 소스코드 작성시 혼돈을 줄여주는 용도
1. 폰트사이즈 재정비, 폰트설정, 폰트스타일 정비
@charset "utf-8"; a { text-decoration:none; color:#999; } a:hover { color:#666; } h1,h2,h3,h4,h5,h6 { font-size:100%; } address,strong{font-style:normal; font-weight:normal;} @font-face{font-family:'NGothic'; src:url('../font/NanumGothic.woff') format('woff');} @font-face{font-family:'NGothicB'; src:url('../font/NanumGothicBold.woff') format('woff');} @font-face{font-family:'NGothicEB'; src:url('../font/NanumGothicExtraBold.woff') format('woff');} body { font:14px "NGothicEB",Gulim; } |
2. marging 초기화, padding 초기화, skip생성
@charset"utf-8"; html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p, blockquote,pre,abbr,address,cite,code,del,dfn,em,img, ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li, fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td, article,aside,canvas,details,figcaption,figure,footer,header,hgroup, menu,nav,section,summary,time,mark,audio,video{margin:0; padding:0;} article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } li { list-style-type:none; } img,fieldset,iframe{border:0;} img,fieldset { border:none; } img{ max-width:100%; }/*ipad사이즈에서 userlogin 의 title등 %로 된 것을 위해*/ li img, dd img { vertical-align:top; } input { vertical-align:middle; } hr{display:none;} #skip, .skip { font-size:0; width:0; height:0; line-height:0; position:absolute; left:-9999px; } |
3. 화면크기별 css 정의
@charset "utf-8"; @media (max-width:767px) { /*휴대폰 화면*/ } @media (min-width:768px) and (max-width:1023px) { /*작은 PC화면*/ } @media (min-width:1024px) { /*큰 PC화면*/ } |
'웹(클라이언트) > CSS' 카테고리의 다른 글
static, relative position 구분 (0) | 2021.09.27 |
---|---|
신문기사 같은 web Page(multiColumn) (0) | 2021.09.27 |
media Query(화면크기에 따라 변하는 web page) (0) | 2021.09.27 |
inline box지정 (0) | 2021.09.27 |
특정 id 또는 class 내부의 tag만 기능 지정 방법 (0) | 2021.09.27 |