滚动DIV没有在A​​ndroid模拟器的工作,iPhone模拟器 [英] scrollable div is not working in android emulator,iphone simulator

查看:227
本文介绍了滚动DIV没有在A​​ndroid模拟器的工作,iPhone模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PhoneGap的。结果
我想保持一个固定的页眉和页脚,我想滚动内容在他们之间。对于我用DIV:

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不允许一个元素(DIV溢出:滚动/自动或帧)内滚动,所以你可以设计你的网站周围的(通常为最好的),或者你可以尝试iScroll,这是一个JavaScript的插件,旨在复权这种能力:

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

祝你好运。

这篇关于滚动DIV没有在A​​ndroid模拟器的工作,iPhone模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆