Joh*_*ohn 7 html css png ipad ios6
在ios5上,网站加载正常并且看起来正确.
由于ios6我的网站中使用png图像作为其背景的一部分开始在iPad上呈现,但是背景只是变为黑色而没有明显的原因(注意所有其他部分保持正确的颜色).
码:
<section id="showcase">
    <section class="container">
    <img src="images/usp.jpg" alt="USP Screen" id="screen">
    <h2>title</h2>    
    <p>the text.</p>
    <p>The text.</p>
    </section></section>
CSS:
#showcase           { background: url(../images/showcasebg.png) repeat-x #ededed; height: 600px; position: relative; top: 87px; }
#showcase h2        { float: left; max-width: 422px; font-family: 'Lobster', cursive; font-size: 36px; margin-top: 20px; }
#showcase p         { float: left; max-width: 422px; margin-top: 20px; }
小智 1
我不确定这是否有直接关系,但昨晚我遇到了类似的问题。我对图像使用相对 URL,发现 iOS6 将图像路径中的空格编码为 %2520 而不是 %20。这对我来说是一个问题,因为我正在模拟器上的应用程序的 Web 视图中查看图像资源,因此模拟器提供的资源路径中有空格。这在设备上不是问题,因为路径中没有空格。
我发现新的远程检查器(此处提到: http: //www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers)对于确定发生的情况非常有用。