댓글 검색 목록

[css] CSS를 사용하여 컨테이너 하단에 항목을 넣는 방법

페이지 정보

작성자 운영자 작성일 19-08-28 18:49 조회 687 댓글 0

CSS를 사용하여 컨테이너 하단에 항목을 고정 시키는 방법 알아보기


나는 맹목적으로 bottom : 0을 부모의 바닥에 붙이고 싶은 요소에 할당했습니다.


내가 두 가지를 잊어 버린 것으로 나타났습니다 : 해당 요소에 position: absolute 및 부모에 대한 position: relative 추가.


예:

<div class="container-element">
  ...
  <div class="element-to-stick-to-bottom">
    ...
  </div>
</div>


.element-to-stick-to-bottom {
  position: absolute;
  bottom: 0;
}

.container-element {
  position: relative;
}



댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.