响应式设计支持手机间隙

编程入门 行业动态 更新时间:2024-10-24 14:20:54
本文介绍了响应式设计支持手机间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我有一个应用程序,我使用手机差距作为包装和专门针对iPad。现在我想要合并一个iPhone版本的应用程序,但有它,所有它在一个应用程序一起编译。所以我想我的问题是,手机差距允许设备特定的布局,让你使用JavaScript来检测这个?

So I have an app I made using phone gap as a wrapper and targeted at specifically iPad. Now I want to incorporate an iPhone version of the app but have it so that its all complied together in one app. So I guess what my question is, does phone gap allow for device specific layouts and let you use JavaScript to detect this?

推荐答案

是的,但最快的方法可能是获取设备的屏幕尺寸,并从那里开始:

Yes, but the fastest way is probably to get the screen size of the device and start from there:

var widthScreen = window.innerWidth; var heightScreen = window.innerHeight;

根据你得到的大小,你可以放心地假设,如果你正在使用iPads vs. iPhone5 vs 。iPhone4并进行更改。

According to the size you get you can safely assume if you're working on iPads vs. iPhone5 vs. iPhone4 and make your changes.

更多推荐

响应式设计支持手机间隙

本文发布于:2023-11-28 06:45:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641347.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:间隙   手机

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!