开发者

Units in HTML for iPhone/iPad

开发者 https://www.devze.com 2023-01-22 21:07 出处:网络
What CSS meas开发者_JAVA百科urement unit should I use for the dimensions (widths, heights, margins, paddings, fonts, etc.) of an embedded HTML resource that should run both on iPhone and iPad?

What CSS meas开发者_JAVA百科urement unit should I use for the dimensions (widths, heights, margins, paddings, fonts, etc.) of an embedded HTML resource that should run both on iPhone and iPad?

Or should I use alternate CSS styles for iPhone/iPad instead?

I would like the content of this resource to look well on both devices, without having two create to versions of the same HTML.


Status bar: 19 px

Navigation bar: 43 px

Content window: 369 px

Toolbar: 48 px

Safari toolbar is 44 pixels.

http://www.iphonecompatible.net/design-tips-tools/iphone-safari-screen-dimensions-layout/

Nice tool: http://www.silisoftware.com/tools/screen.php


The units are totally up to you. You can use whatever you are conversant with. I tend to use pixels because I find them most intuitive and easiest to measure on a computer screen. Also, during most webapp demos in Apple conferences, the unit used is pixels. It's pretty standard.

Checkout http://pxtoem.com to see conversions between units.

Cheers.

0

精彩评论

暂无评论...
验证码 换一张
取 消