我开始用下面成立了一个Photoshop文档:为什么我的图像太大iPhone
宽度:640像素,
高度:960像素
分辨率:326个像素/英寸
图像是直接拍摄该文件。
我使用phonegap来构建应用程序。每当我测试它时,它都会让我的图像太大而不适合iphone屏幕。我没有使用视口或调整任何东西。请帮忙!
一些你问我的代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<link rel="stylesheet" href="iphone.css" type="text/css" />
<!-- iPad/iPhone specific css below, add after your main css >
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" />
<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css" type="text/css" />
-->
<!-- If your application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js into your www directory and include it here -->
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
</script>
</head>
<body onload="onBodyLoad()">
<div class="wrapper">
<img src="img/iPhone/Welcome.png" class="header" />
</div>
</body>
</html>
这不像我知道phonegap,但发布截图或一些源代码将帮助在这里的每个人,我猜。 – 2012-02-13 18:48:00
您保存的图像的最终尺寸是多少?每英寸326像素可能是问题--Photoshop可能会以更大的像素尺寸存储文件,因为它 – 2012-02-13 18:49:05
尝试在文件的末尾添加“@ 2x”。例如:'supermegacoolpicture @ 2x.png' – Novarg 2012-02-13 18:51:24