正文背景在 firefox 中不显示。
这是我的 CSS
body{
font-family:"Trebuchet MS", Helvetica, sans-serif;
font-size:15px;
color: #fff;
overflow-x:hidden;
background: url(../images/2.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
最佳答案
通常当我遇到这个问题时,错误来自图像的路径。如果我是你,我会尝试将它从你的相对路径 url('../images/yourimage.jpg') 更改为绝对路径: 前任。 url('home/user/Desktop/website/images/yourimage.jpg').
如果您的站点已链接到包含图像的文件夹(但应该如此),则您不需要这样做。你只需要 url('image/yourimage.jpg');因为您的站点已经从该文件夹中提取文件
关于firefox - 背景图像在 mozilla firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11228817/