分辨率免费的Android和iPhone应用程序 [英] Resolution free android and iPhone app

查看:94
本文介绍了分辨率免费的Android和iPhone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个Android应用程序,我使用手机间隙设计。我有带有图形,图像和许多功能的html页面。



我想设计一个HTML页面,使其适合Android手机中的设计,Andoid TAb,iPhone,IPAD等



在应用程序中,我有功能来显示图像。目前,我根据手机屏幕的分辨率为Andoid和iPhone维护两个单独的html文件副本。



如何使设计独立于分辨率? 因此任何手机(Android和iPhone)的屏幕分辨率都适用于相同的HTML设计。







感谢您提前获得建议。



谢谢,

Avinash

Hi All,

I have an android application which I designed using a phone gap. I have html pages with graphics , images and many functinality.

I want to design a HTML pages in such a way that it will fit the designs in Android phones, Andoid TAb, iPhone , IPAD etc.

In application I have functinality to show images. Currently I am maintaining two individual copies of html files for Andoid and iPhone as per the resolution of phone screen.

How I can make the designs Resolution independent? so that same HTML designs applied for any phone(android and iPhone) with any resolution of screens.



Thanks for advice in advance.

Thanks,
Avinash

推荐答案

在HTML页面中,我使用jquery库来读取显示区域的高度和宽度。

In HTML page I am using jquery library to read the height and width of display area.


window.width();
window.width();


window.height();
window.height();





然后分配页面上父div标签的高度和宽度。并取出子div'并仅指定一个参数,即num%中的高度或宽度。它将保持纵横比,页面设计将是免费分辨率。



Then assign the height and width for the parent div tag on page. and take the child div''s and assign only one parameter i.e. height or width in "num %" . It will maintain the aspect ratio and the page designs will be resolution free.

<script>
function setSize()
{
var width=


这篇关于分辨率免费的Android和iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆