CSS:背景附件:修复在android中不起作用

时间:2014-10-17 23:48:38

标签: android html css

我需要在this page上将background-attachment: fixed设置为多个背景(俄语文本,但如果在Android浏览器上打开它,您将看到所有错误),但它不起作用!这对我来说非常重要,我会搜索如何做到这一点,但这对于一个bg是有效的,而不适合我。

1 个答案:

答案 0 :(得分:0)

根据Chrome中的开发工具,您的smartmobile.css需要对主容器div进行一些更改:

.ct-general {
  background-attachment: scroll; /* Change this to fixed, line 1 */
}

.ct-catalog {
  background-attachment: scroll; /* change to fixed, remove other declarations, line 4 */
}

.ct-schema {
  background-attachment: scroll; /* change to fixed, line 9 */
}

.ct-sravn {
  background: url('../images/bg_wins.png') !important;
  background-size: auto !important;
  background-attachment: scroll !important; /*change to fixed, line 12 */
}

.ct-clients {
  background: url('../images/clients_bg.png') !important;
  background-size: auto !important;         /* change to cover to fill the space */
  background-attachment: scroll !important; /* change to fixed, 18 */
}

这将与您在移动设备上的桌面样式相匹配。