recently I look some CSS menu code and find this code ,but I don't know what's it meaning exactly,can you explain it for me ? thank you !
background-position takes a
background-position takes a horizontal and a vertical value, when two values are specified the horizontal value comes first. When a percentage is used the percentage is also applied to determine which bit of the background image to line up.
e.g. 100% is the same as right.
background-position: 100% -82px;
will locate the background image, on the right hand side of the container and start it 82px above the container - effectively chopping off the top 82px.
Ratz! Too slow
The first is the horizontal position. Since it's percentage, it means that a point on the image 100% of the way from the left edge of the image will be placed 100% of the way from the left edge of the container. It is the equivalent of saying "right".
The -82px says the top edge of the image will be placed 82px above the top of the container. IOW, 82px off the top of the first iteration will be clipped. This might be done, for instance, to align the background tiling.
I see ,thanks a lot
I see ,thanks a lot! *^_^*