iPhone/智能手机上使用的网页限制

发布于 2024-07-15 10:53:33 字数 606 浏览 10 评论 0原文

我想让我们的主应用程序生成可以在 iPhone 或其他智能手机上轻松阅读的文档文件。 我认为最简单的方法是创建一个简单的 HTML 文件并使用 javascript 来显示/隐藏它的不同部分。 例如,当用户单击/触摸“第 1 部分”时,该部分将展开以显示其完整详细信息; 否则,它将保持折叠状态以节省空间。

创建此文件时应遵循哪些准则? 我做了一些研究并得出以下结论:

  • iPhone 的原始分辨率为 320x480,但网页只能看到大约 320x400。
  • 其他智能手机的分辨率从 160x120(可能不够高,不值得打扰)到 320x240,有些甚至有 480x640。

例如,这些对于决定如何设置 HTML 输出的样式和排列很有用。 还有其他有用的指南可以参考吗? 例如:

1)我应该把东西做得多大/小才能让用户有足够大的“目标区域”?

2) 如何将文件传输到 iPhone 上? 用户是否必须通过 USB 拖放它?

3) 在字体变得太小而无法阅读之前,我可以使用多大的字体?

等等等等。我实际上没有 iPhone 来测试,这使得这个问题变得更加严重。

感谢您的帮助!

I want to allow our main application to generate document files that can be easily read on the iphone, or other smart phones. The easiest way to do this, I think, is to create a simple HTML file and use javascript to show / hide different bits of it. For example, when the user clicks / touches "section 1", the section expands to show its full details; otherwise, it will remain collapsed to save space.

What guidelines should I follow when creating this file? I've done a little research and arrived at the following:

  • The iphone has a native resolution of 320x480, but only about 320x400 is visible for a web page.
  • Other smartphones have resolutions from 160x120 (probably not high enough to bother with) up to 320x240 and some even have 480x640.

These are useful for deciding how to style and arrange the HTML output, for example. Are there any other useful guidelines to work with? For example:

1) How big / small should I make things to let the user have a large enough 'target area'?

2) How can I get the file onto the iphone? Would the user have to drag and drop it via USB?

3) What size of fonts can I use before it gets too small to read?

etc etc. I don't actually have an iphone to test on, which makes this a little more problematic.

Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

世界和平 2024-07-22 10:53:33

我不知道其他智能手机的情况如何,但您的文件进入 iPhone 的唯一方式是通过网络浏览器、电子邮件或您编写的自定义应用程序。 没有用于将文件上传到 iPhone 的通用机制。

即使在 iPhone 上阅读相当小的文本也非常容易,而且基于手势的缩放功能使放大和缩小变得非常容易。

I don't know about other smart phones, but the only way your file is going to get onto the iPhone is via the web browser, email, or a custom application that you write. There is no general mechanism for uploading files to the iPhone.

It's surprisingly easy to read even fairly small text on the iPhone, and the gesture-based zooming makes it very easy to zoom in and out.

怪我鬧 2024-07-22 10:53:33

如果您要通过 ASP.NET 提供文档,您可能需要检查一下:
http://mdbf.codeplex.com/
它允许您检测哪种智能手机发出了请求,然后您可以检查其功能(屏幕分辨率、颜色显示、屏幕像素高度...等)

If you're going to provide your documents through ASP.NET you might want to check this out:
http://mdbf.codeplex.com/.
It allows you to detect what kind of smartphone did the request, you can then check out the capabilities (screen-resolution, color-display, screen-pixels height... etc.)

冷血 2024-07-22 10:53:33

大多数移动浏览器都会呈现 XHTML-MP(XHTML Mobile Profile)。 你可以不用渲染它。

iPhone(以及 Android 等其他 WebKit 手机)支持视口元标记,这可以使体验更加适合手机屏幕尺寸。 您可以在 Apple 的 iPhone 网页创建文档中了解这些内容。

如果您确实有兴趣支持各种手机,那么您应该考虑像 WURFL 这样的“多服务”技术,它可以让您从支持数百部手机中抽象出很多复杂性。 不过,这已经是昨天的技术了,因为现代移动浏览器可以很好地呈现大多数网页。

Most mobile browsers render XHTML-MP (XHTML Mobile Profile). You can get away with rendering that.

iPhones (and other WebKit phones like Android) support the viewport meta tags which can make the experience more tailored to that phone screen size. You can learn about these in the iPhone web page creation docs from Apple.

If you are really interested in supporting a wide range of handsets, you should look at a "multi-serving" technology like WURFL, which will let you abstract a lot of the complexity away from supporting hundreds of handsets. It's sort of yesterday's technology though, since modern mobile browsers render most web pages just fine.

熊抱啵儿 2024-07-22 10:53:33

我不确定这有多新,但雅虎说其中之一iPhone 的限制是它不会缓存大于 25k 未压缩的文件。 这不一定会影响您的显示,但可能会影响您的性能,因此您可能需要在设计中考虑它。

I'm not sure how current this is, but Yahoo says that one of the restrictions for an iPhone is that it won't cache files larger that 25k uncompressed. This doesn't affect your display necessarily, but it could affect your performance and so you may want to take it into consideration for your design.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文