css background-input和firefox

时间:2014-07-23 18:43:20

标签: html css google-chrome firefox

我在使用firefox时遇到了一些麻烦

当我想在输入中显示背景时,它不会计入我想要的位数。

使用以下代码我想将输入背景放在右边(98%),它可以正常使用chrome,但不像firefox那样预期。

.accepted-input
  background: url(../images/nav/success-mini.png) !important;
    background-repeat: no-repeat !important;
    background-position-x: 98% !important;
    background-position-y: 50% !important;
}
使用firefox

渲染下面的

enter image description here

现在使用chrome

enter image description here

我做过一些研究,但我没有发现任何问题。

非常感谢任何帮助。

2 个答案:

答案 0 :(得分:3)

Firefox不支持background-position-x,而是使用以下样式background-position: 98% 50%

答案 1 :(得分:2)

在Firefox中进行速记测试,这里有一个 FIDDLE

.accepted-input {
  background: url(../images/nav/success-mini.png) 98% 50% no-repeat;
}
相关问题