JQuery Mobile scrollview适合屏幕高度

时间:2012-06-29 12:02:53

标签: jquery css jquery-mobile

我希望scrollview中的JQuery Mobile符合屏幕高度。

我想要三行项目,当页面调整大小时,应自动更改项目的高度。

这是我的scrollview container css代码:

    .threeByThree {
        border: solid 0px black;
        background-color: #ccc;
        overflow: hidden;
        width: 100%;
        height: 80%;
        padding-top:10px;
        padding-left:10px;
    }

这是scrollview内的元素的css代码:

    .square {
        width: 200px;
        height: 30%;
        border: solid 0px #333;
        text-align: center;
        line-height: 100px;
        font-size: 20px;
        margin: 10px 10px 10px 10px;
    }

此页面和内容元素也是此css代码:height:100%

我的完整页面代码为here

但它无法正常工作。当我更改浏览器的高度(通过调整浏览器大小)时,有时会出现滚动条,并且元素没有正确调整大小...

有什么问题?

1 个答案:

答案 0 :(得分:1)

您正在使用滚动视图,Jquery Mobile不再支持它。请尝试以下任何一种方法:

Overthrow - 应该是Scrollview的后续作品   JQM iscrollview - 另一种选择

相关问题