您好,请帮助某人解决问题。问题是标题背景图片未在ipad3中正确显示。我的css和html代码如下。在所有桌面浏览器中都可以正常工作。但是.headerhead背景图片隐藏在ipad3浏览器中。
小提琴链接http://jsfiddle.net/jvandhana/CL6Ru/
<div id="header">
<div class="headerhead">
<div class="headerdetail">
My Task
</div>
</div>
</div>
#header {
background: url("../images/bgheadgrey.png") repeat-x scroll 0 0 rgba(0, 0, 0, 0);
color: #FFFFFF;
}
.headerhead {
height: 60px;
line-height: 60px;
text-align: center;
margin: 0 auto;
width: 50%;
background: url("../images/bgtitle_large1.png") no-repeat scroll center 0 rgba(0, 0, 0, 0);
font-size: 2em;
}
ipad3的媒体查询/ * iPad 3和4的媒体查询* /
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (-webkit-min-device-pixel-ratio: 2) {
#header {
position: relative;
z-index: 0;
}
.headerhead {
height: 60px;
width: 600px;
position: relative;
z-index: 999;
}
}
在iPad 3的媒体查询中,.headerhead缺少背景图像,您也必须在此处放置背景图像。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句