[CSS] Background에 Image 추가

김우진·2021년 9월 27일
0

Front

목록 보기
2/5
post-thumbnail

Background에 image 추가

아래의 코드 3줄을 통해서 배경에 image를 주는 효과를 가져올 수 있다.

#img 줄 element {
    background-image: url("이미지 URL");
    background-size: cover;
    background-position: center;
}

썸네일 출처

Image by rawpixel.com on Freepik

0개의 댓글