background-position: x-offset y-offset;
(0,0) = 容器左上角(padding box 左上)。未指定時等同 0 0(左上角對齊)。

background-position: 80px 80px;
圖片向右、向下各移動 80px。

偏移量超過容器尺寸會導致圖片完全移出可視區(不顯示)。
background-position: -80px -80px;
圖片向左、向上移動 80px,相當於「視窗」向右下觀察圖片的不同區域。這是 CSS Sprites 顯示圖標特定區塊的核心機制。
| 關鍵字 | 等效數值 |
|---|---|
| left | 0% |
| center | 50% |
| right | 100% |
| top | 0% |
| center | 50% |
| bottom | 100% |
百分比基準:容器尺寸 - 圖片尺寸。50% 實現圖片在容器中完美置中。
background-position: 50%; /* 等同 50% 50% → 置中 */
background-position: left; /* 等同 left center → 左側垂直置中 */