How to keep panel height fixed with scroll if content overflow for JQuery Mobile

前端 未结 1 505
花落未央
花落未央 2021-02-10 07:09

I have a page with fixed header and a fixed footer. The height of the content is also fixed to the height of the window.

The document has a panel whose content may gro

1条回答
  •  星月不相逢
    2021-02-10 07:49

    Here is you fiddle updated: http://jsfiddle.net/ezanker/GSSD3/1/

    Just added some CSS to absolutely position and size the panel's inner div and to allow scrolling:

    .ui-panel .ui-panel-inner {
        overflow: auto;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;  
        -webkit-overflow-scrolling: touch;
    }
    

    You will need to test this for the devices you are supporting as I am not sure if it will work on all of them...

    0 讨论(0)
提交回复
热议问题