我可以做相對定位精靈
background: url(/images/sprites.png) no-repeat 0 -22px;
或
background: url(/images/sprites.png) no-repeat top center;
,如果我想將我的精靈在頂部中央是什麼?像:
background: url(/images/sprites.png) no-repeat 0 -22px top center;
UPD
我有動態寬度的塊。我想把它的top center
放在我的圖片中,那是精靈的一部分。
你不能做到這一點。就那麼簡單。 –