修复了 Jqtouch 中的标头
What should i change in the basic theme of jqtouch to have a fixed header (+ footer maybe...)?
I have tried with position:fixed.. but nothing worked...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
查看此 jQTouch 插件 - http://code.google.com/p/jqtscroll/
Check out this plugin for jQTouch - http://code.google.com/p/jqtscroll/
Mobile Safari 不支持position:fixed(至少不支持Web 开发)。
或者,您可以尝试实现 此 javascript 解决方案
Mobile Safari doesn't support position:fixed (at least not in a way that makes it useful for web development).
Alternatively you could try to implement this javascript solution
看看这个网站:
http://demo.lvengine.net/mobileuplink
请注意,它使用了一个额外的 div:
看一下在这个网站的 javascripts 和 css 中。作者对原始 jqtouch 脚本进行了一些修改以适应这种修改。
对于“固定”页脚,例如选项卡栏,您只需在与 div#jqt 相同的级别添加一个附加 div:
然后为 .tabbar 编写 css。以我的为例:
Take a look at this site:
http://demo.lvengine.net/mobileuplink
Note that it uses an extra div:
Take a look at the javascripts and css from this site. The author modified the original jqtouch scripts a bit to fit this modification.
For a "fixed" footer, e.g. tab bar, you simply add an addition div at the same level as div#jqt:
Then code up the css for .tabbar. Use mine as example:
看看 DataZombies jQtouch Fork - 他的增强功能非常酷,包括固定页眉和页脚!
=> Tabbar Demo
看来他使用iScroll,也可以独立使用。
Have a look at DataZombies jQtouch Fork - his enhancements are really cool and include fixed headers and footers!
=> Tabbar Demo
It seems he uses iScroll, which could be use independently as well.
正如 Thomas 指出的,在 iPhone 上运行的当前版本的 Mobile Safari 不支持此功能。
如果您无论如何都在使用 jQTouch,请查看与最新下载捆绑在一起的“floaty”扩展。它添加了一个浮动 div,随着您的滚动而移动,尽管有一些延迟。该行为与移动 GMail 界面中的“存档”栏非常相似。
这是 jQTouch 上提到 floaty 的扩展页面:
http://code.google.com/p/jqtouch/wiki/Extensions
只需下载最新的捆绑包,一切就都在那里。这不是一个完美的解决方案,但总比没有好。
As Thomas pointed out there's no support for this in the current version of Mobile Safari that runs on iPhone.
If you're using jQTouch anyways, take a look at the "floaty" extension that comes bundled with the latest downloads. It adds a floating div that moves along with your scrolling, albeit with some delay. The behavior is very similar to the "archive" bar in the mobile GMail interface.
Here's the extensions page on jQTouch that mentions floaty:
http://code.google.com/p/jqtouch/wiki/Extensions
Just download the latest bundle and everything is there. It's not a perfect solution, but it's better than nothing.
我正在开发我的版本,在 jQtouch 上添加固定标签栏
http://www.itabbar.com
它与 jQtouch、iScroll 和 iTabbar
一起使用 在线演示(仅限桌面浏览器 Safari 和 Chrome)
i'm working on my version, to add a fixed tabbar on jQtouch
http://www.itabbar.com
it's working with jQtouch, iScroll and the iTabbar
Here a online demo (only Safari and Chrome for desktop browser)