CSS3 | 배경이미지 전체화면 적용 (background-size:cover)
페이지 정보
작성자 GIT 작성일17-03-30 15:33 조회13,379회 댓글0건본문
■ background-size
- css3
- background-size: cover; // 배경 전체를 채움 (비율을 유지하기 때문에 이미지가 잘릴수 있음)
- background-size: 100% 100%; // 배경 전체를 채움 (비율유지X)
- background-size: auto; // 원본값
- background-size: 200px 150px; // 가로 200px, 세로 150px
<예>
div {
background: url(test.jpg);
background-size: cover;
}
댓글목록
등록된 댓글이 없습니다.