레이어 화면 중앙 정렬 (가로, 세로)

CSS

화면 중앙에 div를 놓고싶을 때 사용.
width, height 값이 반드시 필요하니 주의

.center { position: absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; width: 100px; height: 100px; }
<div class="center">wallel</div>
블로그
프로젝트
스터디