background-position-y在Firefox中不工作(通过CSS)?
在我的代码中, background-position-y
不起作用。在Chrome它是确定,但不能在Firefox中工作。
In my code the background-position-y
doesn't work. In Chrome it's ok, but not working in Firefox.
任何人都有解决方案?
是0,没有其他解决方案比写:
If your position-x is 0, there's no other solution than writing :
background-position: 0 100px;
background-position-x是来自IE的非标准实现。 Chrome已经复制了它,但很遗憾没有firefox ...
background-position-x is a non-standard implementation coming from IE. Chrome did copy it, but sadly not firefox...
但是,如果你在一个大背景上有单独的sprites,行和列的意思不同,这个解决方案可能不是完美的事情...(例如每行上的不同标志,选择/悬停在右边,左边平原)
在这种情况下,我建议将单独图像中的大图片分开,或者写不同的组合CSS ...根据精灵的数量,一个或另一个可能是最好的选择。
However this solution may not be perfect if you have separate sprites on a big background, with rows and cols meaning different things... (for example different logos on each row, selected/hovered on right, plain on left) In that case, I'd suggest to separate the big picture in separate images, or write the different combinations in the CSS... Depending on the number of sprites, one or the other could be the best choice.