【问题标题】:background-image have incorrect position in firefox but in chrome is rightly背景图像在 Firefox 中的位置不正确,但在 chrome 中是正确的
【发布时间】:2013-10-20 14:44:32
【问题描述】:

我的内容容器中的背景图像阴影有问题。在 Chrome 中是背景位置正确但在 firefox 中是错误的。

这里是我的测试站点:http://www.behringer-mauch.de/Tischler_Hehmann/index.php

我希望有人有想法。

【问题讨论】:

    标签: css background-image background-position


    【解决方案1】:

    CSS 规范中未批准 x 和 y 的单独背景位置,因此

    background-position-x: 80%;
    background-position-y: bottom;
    

    可以在 Chrome 中运行,但不能在其他浏览器中运行。

    http://www.w3.org/TR/css3-background/#background-position

    【讨论】:

    • jep 这是解决方案: background-position: left 235px bottom 0px; THX
    【解决方案2】:

    为 mozilla firefox 使用前缀 -moz-。

    示例 -webkit-linear-gradient 用于基于 Webkit 的浏览器 (Chrome)

    -moz-linear-gradient 用于 Mozilla Firefox

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-19
      • 2021-04-04
      • 1970-01-01
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多