开发者

Website for iPad Mobile Safari

开发者 https://www.devze.com 2023-02-25 19:41 出处:网络
While creating a website for iPad Mobile Safari, I have a few questions; Does the orientation happen automatically or do we have to write code for that ?

While creating a website for iPad Mobile Safari, I have a few questions;

  1. Does the orientation happen automatically or do we have to write code for that ?
  2. What is the best approach in terms of CSS/JS..I mean create separate copy of the web CSS for iPad and just update for iPad specific. Also what about JS?
  3. What is the best way to detect for iPad (CSS/JS) and how?

Any online references which specificall开发者_运维知识库y covers iPad Mobile Safari development will also be great. Thank you.


The orientation happens automatically, but you can write code to intercept the event and do things.

I highly recommend using an existing JS library such as Sencha Touch to handle the UI for you; they automatically detect the client and will display the appropriate scale of the app.


I just added a few meta tags to my current project, based on this page - http://www.nczonline.net/blog/2010/04/06/ipad-web-development-tips/

It made a huge difference. The orientation media queries work great. I madea simple example by setting the body background colour different based on orientation.

0

精彩评论

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

关注公众号