【问题标题】:CSS background-issues in Mobile-ChromeMobile-Chrome 中的 CSS 背景问题
【发布时间】:2016-06-05 16:19:25
【问题描述】:
<div style="
width:100%; height:100%;
background-image:url('images/background.jpg');
background-position:center bottom;
background-repeat:no-repeat;
background-size:cover;
">&nbsp;</div>
  • 背景位置> 不显示图像
  • background-size:cover > 拉伸版

【问题讨论】:

  • 1. div 父级是否有固定高度?如果没有,您至少需要添加html, body {height: 100%;} 才能使百分比高度起作用。 2.你确定图片路径正确吗? 3. 哪个chrome版本?
  • 您面临的问题是什么?请更具体。
  • ..所有桌面浏览器都正确显示。 [1] 父级是 body / html,body {height: 100%;} [2] 路径正确 [3] chrome 50.0.2661.89 & 在 mobile-opera 36.2.2126.102826 中也类似
  • [更新] ..这是图片 - 图片导致了问题。但仅限于这些移动浏览器。
  • 你能解释一下吗?图片到底有什么问题?

标签: css google-chrome opera mobile-browser


【解决方案1】:

图片尺寸 (5472x3648) 对于 Mobile-Chrome 和 Opera 来说太大了。这就是这些症状的原因。

【讨论】:

    猜你喜欢
    • 2012-01-05
    • 2016-07-24
    • 1970-01-01
    • 2012-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-06
    相关资源
    最近更新 更多