가장 핵심적인 CSS 속성에 관한 정리
div {
display: block;
display: inline-block;
display: inline;
display: none;
}
img {
max-width: 100%;
height: auto;
}
div{
margin: 20px 10px 20px 10px;
/* TOP, Right, Bottom, Left. */
margin: 20px 10px 20px;
/* Top, Left and Right, Bottom */
margin: 20px 10px;
/* Top and Bottom, Left and Right */
margin: 20px;
/* 20px worth of margin on all 4 sides */
}
div{
border: 1px solid black;
/* border width, style and color */
}
clear를 제대로 하지 않을 시 생기는 문제들 ↓
left, right, none
clear = clear:left, right, both = float 제거
overflow-hidden = 엘리먼트 간에 충돌 방지
clearfix = 말로 설명하기 어려움..
body {
background:transparent image-url('image.png') left top no-repeat;
}
body {
font: italic small-caps bold 20px/1.5 "Proxima Nova", helvetica, arial, sans-serif;
/* font shorthand */
}
해당 정리는 https://zellwk.com/blog/9-important-css-properties-you-must-know/ 페이지를 참조하여 작성하였다.