简体   繁体   English

固定位置在 iPhone 中不起作用

[英]Position Fixed not working in iPhone

I am creating a HTML page for my web site but unfortunately position fixed for top navigation menu is not working in iPhone.我正在为我的网站创建一个 HTML 页面,但不幸的是,顶部导航菜单的固定位置在 iPhone 中不起作用。

Can anyone please help me?谁能帮帮我吗?

Cheers,干杯,

Position:fixed was supported as of iOS 5, if you are trying or hoping to make it work on anything older ( iOs4 ) you are out of luck as it was not supported.从 iOS 5 开始支持 Position:fixed ,如果你正在尝试或希望让它在任何旧版本 ( iOs4 ) 上工作,你就不走运了,因为它不受支持。 "iOS4 and below simply treats elements as static and scrolls them along with the rest of the page." “iOS4 及更低版本只是将元素视为静态元素,并将它们与页面的其余部分一起滚动。”

I Had the same problem with a mobile website I made a while ago & eventually was a success!我之前做的一个移动网站也遇到了同样的问题,最终成功了!

maybe if I could take a look at your source code, look though it fix th problem and post it back here.也许我可以看一下您的源代码,看看它是否解决了问题并将其发回此处。 :) :)

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

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