问题描述
我在深化发展Web应用程序的移动设备的过程。一世去与Web应用程序,因为对我来说,似乎是一个胜势不得不开发能在iPhone上也运行一个应用程序/Windows移动/棕榈等。
I'm in the process of developping a Web Application for mobiles. Iwent with web applications because to me it seems a winning situationhaving 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 anddesigns and what I wanted to do was have a menu that sticks at thebottom of the page. Exactly like the menu on the bottom in this iPhoneapplication screenshot :
使用CSS,我虽然这将是很容易做到这一点。只有使用位置:固定;底部:0;会做的伎俩,但我已经找到它不能在移动浏览器的行为相同
Using CSS, I though it would be really easy to do this. Only usingposition:fixed; bottom:0; would have done the trick but I have foundit 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 frameswith no luck either. Does anyone know of any way to re-create a menuthat would stick to the bottom of a page for mobile phones?
推荐答案
在我的Android 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应用程序:位置:固定的坏了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!