[英]CSS background not resizing in mobile but resize works on all desktop browsers
我有一個不會在移動設備中調整大小的背景圖片。 從各方面來看,它似乎應該可以工作,因為它可以在我能找到的每個瀏覽器用戶代理應用程序中調整大小。 這是我的代碼...
標題元...
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
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;
}
我正在使用 Joomla,並將其鏈接到一個模塊類。
這應該不是問題,可能不是由於 CSS。 我會考慮像這樣重新格式化 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.