는 배너가 나쁜 CSS.
background-position
속기 위해, background-position-x
고 background-position-y
.
그래서,
banner {
background-position: bottom;
background-position-x: center; /* This is not doing anything, because x became 'center' when it was omitted above. */
background-position-y: center; /* This will override the previously set 'bottom' */
}
당신이 언급한 background-position: center
는 동일한 작업 이후,x,y 될 것입니다'center'.
아무것도 잘못된 키워드를 사용하여,그러나 당신은 단지 시작 CSS,나는 당신을 얻을 사용하는 데 사용합니다.
(당신에게 감사할 것이 나중에 더 필요할 때 특정을 사용하여 위치를 calc()
.
background: 0% 100%
= background: left bottom
background: 100% 0%
= background: right top
background: 50% 50%
= background: center center
출처: https://developer.mozilla.org/en-US/docs/Web/CSS/background-position