background-position-y在Firefox中不工作(通过CSS)? [英] background-position-y doesn't work in Firefox (via CSS)?

查看:98
本文介绍了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.

这篇关于background-position-y在Firefox中不工作(通过CSS)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆