업무를 진행하면서 background를 한번에 사용하는 것을 본 적이 있다.
아래는 내가 가장 길게 사용한 background css이다.
background: #fff url(@/img.png) right bottom / 90% no-repeat;
background css를 한번에 사용할 때는 아래와 같은 순서로 사용한다.
백그라운드 배경색(background-color) #fff
이미지 경로 url(background-image) url(@/img.png)
백그라운드 위치(background-position) right bottom
반복(background-repeat) no-repeat
스크롤 효과(background-attachment)scroll or fixed
이미지 경로 url(background-image) url(@/img.png)
백그라운드 위치(background-position) right bottom
/
사이즈(background-size) 90% or center or cotain 반복(background-repeat) no-repeat
스크롤 효과(background-attachment)scroll or fixed
위의 속성 중 사용하지 않고 싶은 속성은 넘어가고, 다음 속성 중 사용할 속성부터 작성해 주면 된다.
'비전공자 검은콩의 몸으로 부딪히는 실무' 카테고리의 다른 글
| [HTML] input / label 태그의 웹접근성 (0) | 2023.08.02 |
|---|---|
| hover시 tooltip이 나타나게(형제 선택자) (0) | 2023.08.01 |
| [CSS] 버튼의 위치 조정(float, align-items) (0) | 2023.07.28 |
| [css] 이미지가 크롬에는 적당히 노출, 파이어 폭스에선 깨질 때 (0) | 2023.07.27 |
| [Vue3] v-for과 v-for에서 클릭 시 같은 index값의 노출 (0) | 2023.07.26 |