开发者

How to build correctly Android-compatible website?

I am HTML/CSS/jQuery coder. And I need to develop the website, which will be "zoomed-out" or "fitted" to 320x480 (frequently used resolution) Android mobile device screen. Or even this solutions should check my screen resolution and connect the right CSS for that. Somewhere I met that there is android.js file, which connects to HTML and recognizes if the website was open on PC or on android device. But I am not sure at all. I didn't do anything for mobiles before.

Found this article: http://blog.mgpwr.co.uk/2010/09/make-your-website-ip开发者_C百科hone-compatible/ Don't think it's a right solution to use PHP for that. Better would be HTML or JS.


A very simple answer would be don't hardcode width on the elements and don't specify font size in pixels. The mobile browser will adjust the rendered page itself.

If however you want more iPhone-like look of form controls like radio buttons, buttons, drop downs, then you need to use the mobile javascript libraries outlined in the other answer.


A simple answer would be a mobile javascript library such as one of the following:

http://www.sencha.com/products/touch/

http://www.phonegap.com/home/

http://jquerymobile.com/

http://jqtouch.com/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜