CSS在移动设备上显示背景

时间:2014-03-12 03:25:59

标签: ios css mobile background background-image

我一直在使用这个CSS一段时间了,我认为现在是时候我会问一些知识渊博的人了。我是移动平台网络开发的半新手,是StackOverflow的新手(刚刚创建了一个帐户,但事先经常阅读),我试图解决这个问题。

基本上,我的背景图片显示在我的电脑上的浏览器中,但不会显示在移动浏览器中。我真的很感激帮助!

如果您想查看屏幕截图,我已将图片上传到Dropbox公开链接:

在Google Chrome上展示,Mac OSX:PC Rendering

在Safari,iOS上呈现:Mobile Rendering

body {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 24px;
    color: #626262;
    height: 100%;
    background: #fff url('default-bg.jpg') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.tall-header-page,
.short-header-page,
.no-header-page,
.landing-page {
    background: #222121;
}

.tall-header-page .wsite-background,
.short-header-page .wsite-background{
    background: #fff url('image123.jpg') center center no-repeat;
    background-size: cover;
}

.landing-page .wsite-background {
    background: #fff url('default-bg.jpg') center center no-repeat;
    background-size: cover;
}

谢谢,如果我没有提供足够的代码,请告诉我们!

0 个答案:

没有答案