Maximise div[data-role=content] in Jquery Mobile

纵饮孤独 提交于 2019-12-11 23:33:25

问题


Has anyone actually succeeded in doing this it seems like there are so many attempts on line but no one has a definite solution. I've tried plugins that a lot of people suggested but nothing is working.

I just want to have a Google Map go full dimensions (apart from header and footer) and then on another page I want a div to do the same


回答1:


JQuery-Mobile content area 100% height between head and foot

In the meantime I would recommend to use iScroll [with CSS position:fixed; for header&footer in iOS5 only]

In iScroll you just wrap the content into a wrapper & scroller class, the rest is done by the script. Here's the homepage http://cubiq.org/iscroll-4 and here's some code:

<div id="content" data-role="content">
     <div id="wrapper">
         <div id="scroller">
           your content here.
         </div>
     </div>
</div>

For iScroll initialization use the documentation provided on cubiq's site.

zY



来源:https://stackoverflow.com/questions/8161634/maximise-divdata-role-content-in-jquery-mobile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!