Delving into the codes of other sites, not once met the pictures, which combined background images for different elements (for example, colored buttons). For example, this is how this

Can you tell me how this is achieved? You can link to any article about this, or search query =)

Addition: under the word "this" I mean styles that indicate exactly which part of the picture to use for a particular element.

    3 answers 3

    This is called sprite. Google

    • For several reasons, I accept this answer) - sinedsem

    CSS sprites - the first link in Google. width, height, background-position decides.

      You take this sprite and in the right place just change the position of the display relative to that HTML element where you need to display the desired image from the sprite.

      1. Only 1 picture is loaded
      2. You can post a lot of pictures on it