Any recommendation on how to find the position of the icon in the sprite image

I'm new to sprite, I think I understand the concept of changing the position of the background to replace the image. so I have this big sprite png that I downloaded, but how do I know the position of the icons?

I don’t have a photo store, is there any other recommended tool (free) to find a position?

+3
source share
5 answers

MSPaint displays the cursor position relative to the image in Windows 7. If you use the selection tool, it will show the size and position.

GIMP or Paint.Net will work too.

+1
source

, .

, . CSS , CSS .

  • , Photoshop. X Y . , left, top - 0,0. x y :

    background-position: -310px -123px;

"-" X Y.

  • background-position: 1px 1px;

Firebug " ". .

+7

You can use Sprite Cow to search for icon locations without using an external program. The site serves sophisticated icon selection options.

+6
source

You might want to use the CSS Sprites generator . It will make your life easier.

+1
source

GIMP or any primitive image editor.

0
source

Source: https://habr.com/ru/post/1755888/


All Articles