Get background image from a image file by position in CSS
We suppose that we have the following image (is a single file with 4 radio buttons, seems same but it is for example, the Icons could be different):
I saw, a time ago, how to get an image by specifing Background-position in CSS style. How to do that ?
Means, how to get the icon from lower-right side in CSS instead splitting that file in four icons separately ?
Sorry if this question is obsolete but I'm beginner in CSS.
Have a look at the
MDN has an article about it, including examples.
There are also a number of articles available about image-sprites with CSS.
This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here