滚动条不会在jquery mobile中消失

时间:2014-06-03 20:15:19

标签: jquery-mobile

我正在使用jQuery Mobile,无论页面上有多少内容,总会有一个右侧显示的滚动条。即使打开溢出隐藏也不会让它消失。该页面只有标题,链接和面板。如何删除它?

HTML大致如下:

<body>
<!-- Document framework -->
<div data-role="page">
    <div data-role="panel" id="toolmenu" data-theme="a">
        <form>
                <fieldset data-role="controlgroup">
                <legend>Select Tool:</legend>
                <input name="radio-choice-v-2" id="radio-choice-v-2a" value="on" checked="checked" type="radio">
                <label for="radio-choice-v-2a">One</label>
                <input name="radio-choice-v-2" id="radio-choice-v-2b" value="off" type="radio">
                <label for="radio-choice-v-2b">Two</label>
                <input name="radio-choice-v-2" id="radio-choice-v-2c" value="other" type="radio">
                <label for="radio-choice-v-2c">Three</label>
            </fieldset>
        </form>
    </div>
    <div data-role="header">
        <h1>TITLE</h1>
    </div>
    <div data-role="content">
        Stuff<br />
        <a href="#toolmenu">Open panel link</a>
    </div>
    <div data-role="footer" data-position="fixed">
        Footer
    </div>
</div>
</body>

感谢。

1 个答案:

答案 0 :(得分:0)

我解决了这个问题。问题是我的css文件顺序错误。当您使用jquery mobile的自定义主题时,您必须按特定顺序拥有css文件 - 即,您的themeroller创建的自定义主题必须在jquery mobile css之前,并且您必须使用jquery.mobile。 structure-1.4.2.min.css(或者无论你使用的是什么版本的等价物),而不是完整的css文件。