CSS - 背景大小:封面; 不在Firefox中工作

Jay*_*wal 1 html css firefox android background-image

body{
    background-image: url("./content/site_data/bg.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    font-family: 'Lobster', cursive;
}
Run Code Online (Sandbox Code Playgroud)

检查:在Firefox浏览器上http://demo.jayantbhawal.in,而不是在宽屏模式下.

该代码适用于Chrome(Android + PC)甚至是现有的Android浏览器,但不适用于Firefox(Android + PC).有什么好的替代品吗?为什么它不能正常工作?谷歌搜索了很多次这个问题,但似乎没有其他人有这个问题.只有我吗?无论如何,我该如何解决?关于它也有很多关于它的问题,但它们都没有提供合法的解决方案,所以有人可以告诉我他们是否有背景大小:封面; 关于firefox的问题呢?

所以基本上告诉我三件事:1.为什么会这样?2.什么是它的好选择?这也发生在你身上吗?当然,在Firefox浏览器上.

Chrome版本35.0.1916.114 m Firefox版本29.0.1

注意:我可能已经尝试修复它,所以有时您可能会看到一个非常奇怪的页面.稍等一下,然后重装.

4dg*_*rav 7

在此输入图像描述在最新的mozilla中它看起来不错.

如果遇到问题,请尝试使用此功能

body { 
  background: url("./content/site_data/bg.jpg") no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  font-family: 'Lobster', cursive;
}
Run Code Online (Sandbox Code Playgroud)

编辑

正如评论中对OP的回答更多一些

background: url("./content/site_data/bg.jpg") no-repeat center center fixed;
Run Code Online (Sandbox Code Playgroud)

它的简写,

background-image: url("./content/site_data/bg.jpg");
background-repeat:no-repeat;
background-position: center center;
background-attachment:fixed;
Run Code Online (Sandbox Code Playgroud)

在这里阅读更多