[英]CSS background not resizing in mobile but resize works on all desktop browsers
I have a background image that will not resize in mobile.我有一个不会在移动设备中调整大小的背景图片。 By all accounts it seems it should work as it resizes in every browser user-agent app I can find.从各方面来看,它似乎应该可以工作,因为它可以在我能找到的每个浏览器用户代理应用程序中调整大小。 Here is my code...这是我的代码...
Header meta...标题元...
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
CSS CSS
.row-feature.row-feature-primary {
background: url(../images/lonelygirl2.png) no-repeat center top fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
I am using Joomla, and I'm linking this to a module class.我正在使用 Joomla,并将其链接到一个模块类。
This should not be a problem, and probably not due to the CSS.这应该不是问题,可能不是由于 CSS。 I would consider reformatting the CSS like this:我会考虑像这样重新格式化 CSS:
.row-feature.row-feature-primary {
background-image: url(../images/lonelygirl2.png);
background-repeat: no-repeat;
background-position: center top;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.