Android的Web应用程序:位置:固定的坏了? [英] Android Web App : Position:fixed broken?

查看:186
本文介绍了Android的Web应用程序:位置:固定的坏了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在深化发展Web应用程序的移动设备的过程。一世 去与Web应用程序,因为对我来说,似乎是一个胜势 不得不开发能在iPhone上也运行一个应用程序/ Windows移动/棕榈等。

I'm in the process of developping a Web Application for mobiles. I went with web applications because to me it seems a winning situation having to develop one application that could run also on iPhone / Windows Mobile / Palm etc.

我开始后,今天的做概念,观点和几天测试 设计,是我想要做的是有那支在一个菜单 页面的底部。酷似在此iPhone上底部的菜单 应用截图:

I started testing today after a few days of doing concepts, ideas and designs and what I wanted to do was have a menu that sticks at the bottom of the page. Exactly like the menu on the bottom in this iPhone application screenshot :

使用CSS,我虽然这将是很容易做到这一点。只有使用 位置:固定;底部:0;会做的伎俩,但我已经找到 它不能在移动浏览器的行为相同

Using CSS, I though it would be really easy to do this. Only using position:fixed; bottom:0; would have done the trick but I have found it doesn't behave the same on mobile browsers

我试图分裂我的页面在2个部分:1将是一个滚动的DIV (用于内容),而另一个将是底部菜单。 滚动的div也不会在Android上运行。我也尝试过使用帧 没有运气无论是。有谁知道有什么方法可以重新创建菜单 将坚持一个页面底部的手机?

I tried to split my page in 2 sections : 1 would be a scrollable div (for the content) and the other one would be the bottom menu. Scrollable divs also do not work on Android. I also tried using frames with no luck either. Does anyone know of any way to re-create a menu that would stick to the bottom of a page for mobile phones?

推荐答案

在我的Andr​​oid N1与的CyanogenMod我有这个麻烦也和修复:

On my Android N1 with CyanogenMod i had this trouble too and the fix:

   <meta
     name="viewport"
     content="width=100%; 
             initial-scale=1;
             maximum-scale=1;
             minimum-scale=1; 
             user-scalable=no;"
    />

具体的用户可升级=无; 部分,你也可以把 0 而不是没有

Specifically the user-scalable=no; part, you can also put 0 instead of no.

有趣的是这打破按钮机器人的渲染,但所有你需要做的是设置背景颜色的按钮。

Interestingly this breaks androids rendering of buttons, but all you have to do is set a background color to buttons.

这篇关于Android的Web应用程序:位置:固定的坏了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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