简体   繁体   English

适用于iPhone Safari的android webapp定制

[英]android webapp customization for iphone safari

I created an andoird application that has a webview to my site so that i have a web application. 我创建了一个对我的网站具有webview的andoird应用程序,因此我具有一个web应用程序。 I want to allow iphone users to access the application using their safari by giving them a link (QR). 我想允许iphone用户通过给他们一个链接(QR)使用他们的野生动物园访问应用程序。

My problem is that my site has buttons and DIVs with specific widths and heights in pixels in their CSS and the page looks very small on the iphone safari screen (zoom is needed). 我的问题是我的网站的CSS中有按钮和DIV,具有特定的宽度和高度(以像素为单位),并且在iphone Safari屏幕上页面看起来很小(需要缩放)。

What is the best method to customize for iphone ? 为iPhone定制的最佳方法是什么?

Possibilites i thought of: 我想到的可能性:

a) JS code that detects the iphone and runs through the DIVs and resizes them b) look for a possiblity to do in JS a "zoom-in" to a certain factor which will show the page nicely over the whole screen (is this possible?) a)检测iphone并运行DIV并调整其大小的JS代码b)寻找在JS中执行“放大”到特定因素的可能性,该因素将在整个屏幕上很好地显示页面(是否可以?)

Any other option will be welcome too ... 任何其他选择也将受到欢迎...

Thanks, 谢谢,

You should check out the viewport meta tag . 您应该检出视口meta标签

You can set it using scaling factor: 您可以使用比例因子进行设置:

<meta name = "viewport" content = "initial-scale = 1.0">

Or a certain width: 或一定宽度:

<meta name = "viewport" content = "width = 590">

Or to the device's width: 或设备的宽度:

<meta name = "viewport" content = "width = device-width">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM