开发者

scrollable div is not working in android emulator,iphone simulator

开发者 https://www.devze.com 2023-03-16 22:19 出处:网络
I am using phonegap. I want to keep a fixed header and footer,and i want to scroll the content in between them. For that i used div with:

I am using phonegap.

I want to keep a fixed header and footer,and i want to scroll the content in between them. For that i used div with:

div
{
    width: 249px;
    height: 299px;

    background-color:Gray;
    overflow-y: auto;
} 

style.

But the div is not scrolling.

开发者_开发技巧But in browser it is fine.


iOS doesn't allow scrolling within an element (div with overflow:scroll/auto or frames) so you can either design your site around that (usually for the best) or you can try iScroll, which is a javascript plugin designed to re-instate this ability:

http://cubiq.org/iscroll-4

Good luck.


Div scrolling does work in iOS if this property is added:

-webkit-overflow-scrolling: touch

0

精彩评论

暂无评论...
验证码 换一张
取 消