position속성은 태그를 어떻게 배치
시킬지를 지정한다. top, right, bottom, left 속성이 요소을 같이 사용한다.
position을 쓸 때 어떤 type
으로 쓸지, 기준점
을 어디로 잡을지 생각하고 써야한다.
.wrap {
width: 500px;
height: 500px;
background-color: wheat;
margin: 0 auto;
position: relative;
}
img {
width: 300px;
height: auto;
border-radius: 50%;
position: absolute;
left: 50px;
top: 100px;
}
👩💻참고1) viewport란? 브라우저창의 전체 크기
👩💻참고2) position을 absolute나 fixed로 설정시 block태그의 특징 중 하나인이 가로크기가 100%가 되는 것이 사라지게 된다. (float와 비슷)