【发布时间】: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;
"> </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