html - Ubuntu 网页背景中的白色 block

标签 html css ubuntu

我在 Ubuntu 14.10 上开发一个网站。

Chrome 无法正确渲染背景。底部呈现良好,这是覆盖整个宽度的页脚。然而,内容 div 的背景只是白色。

查看图片以供引用(我是 Stackoverflow 的新手,需要更多代表才能发布图片):

https://www.dropbox.com/s/rqnlg9eh4k7cbv5/white-background-os.png?dl=0

在 OS X 或 Windows 上不会出现该问题,并且浏览器的选择不会影响该问题。

我使用的是 Alienware M14X R2,所以我认为 Nvidia 驱动程序可能是问题所在,但它们是最新的。

背景代码:

它只发生在这个特定的网站上,所以我猜我的 CSS 有问题。奇怪的是它只适用于 Ubuntu(我猜还有其他几个 Linux 发行版)

基本上我有这个:

HTML (主页.ejs)

<div ui-view ng-app="myApp" id="wrap-content">
   <!--Content swapped with Angular and ui-router-->
</div>

CSS:

@media screen and (min-width: 1024px) {

  html {
    background: url("images/bg.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
  }

  div#wrap-content {
    width: 900px;
    height: 84vmin;
    overflow: hidden;
    margin: 0px auto;
    position: relative;
    top: 45px;
  }
... a bunch of other stuff
}

非常感谢任何帮助。

最佳答案

好吧,我只是偶然解决了这个问题。将背景应用到 HTML 导致了这个奇怪的问题。将其更改为:

body {
    background: url("images/bg.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

解决了这个问题。希望这对遇到同样问题的任何人都有用!

关于html - Ubuntu 网页背景中的白色 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28373454/

相关文章:

linux - 有没有办法找出哪个蓝牙设备插入哪个USB端口?

javascript - 检索 Canvas 上元素的 ID

html - 如果垂直滚动条可见,Chrome 中的 Flexbox 元素高度错误

css - 水平居中一个伪元素(形成一个三 Angular 形)

html - Chrome : Hovering over div moves adjacent div: How to find culprit?

ubuntu - gforth 出错,libtool 编译失败

ubuntu - Jupyter 错误 "ModuleNotFoundError: No module named ' jupyterlab'”

html - 图像调整大小,符合最大宽度但改变高度以保持纵横比

html - 将网页分成几个部分并响应

javascript - 如何让幻灯片在移动到下一张幻灯片之前持续很长时间,以及如何将圆点向上移动到幻灯片的左上角