css background-image coordinates - what tool to use? [closed]
开发者_运维知识库
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this questionLooking at the following image:
What tool should I use to get the coordinates of the image section that I want, so that I can use it for example in:
.myimage {
background-position: -283px -64px;
}
Thanks.
Nearly any image editor or viewer. Even MS Paint (in Windows 7) will show the coordinates with the Select tool in the lower left.
Try this online tool: http://www.spritecow.com/ Open you png picture, just select the icon, sprite css will be generated automaticly
If each image were already an exported png or jpg, you could use a tool like locator.codestrict.com to output the coordinates automatically.
You just choose your background image and the cropped images you want to locate and the css top/left is will display. Of course, you'd just have to translate top/left to background-position.
精彩评论