0

I'm making a sliding door button through sprites and there's one part that is giving me some trouble. Is there any way to set the anchor point AND the background-url image position: So something like this:

background-position: 0 -47px top right;
user852367
  • 1,000
  • 1
  • 9
  • 15

3 Answers3

0

No. The dimensions of your "window" need to match the image exactly, otherwise, it will be cut/other images be displayed.

You may not specify where to place the sprite (it kinda beats the purpose).

Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308
0

No. "top" and "right" are just aliases for the values 0 and 100%.

Stephan Muller
  • 27,018
  • 16
  • 85
  • 126
0

If width and height of Your anchor are constant then You can use sprite and define coordinates (0 -47px in Your example). If anchor can have various size then I think better will be cut that background as separate image and add 'top right' position for background. As people above me said- there is no way to use both- 0 -47px and top right values.

Rob
  • 570
  • 1
  • 6
  • 16