【问题标题】:JQuery Mobile scrollview fit to screen heightJQuery Mobile 滚动视图适合屏幕高度
【发布时间】:2012-06-30 23:07:45
【问题描述】:

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

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

这是我的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

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

有什么问题?

【问题讨论】:

    标签: jquery css jquery-mobile


    【解决方案1】:

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

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-05-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-07
    • 1970-01-01
    • 1970-01-01
    • 2012-05-19
    相关资源
    最近更新 更多