数据主题设置为页面未应用于jquerymobile的页眉和页脚

Cod*_*ber 2 jquery-mobile

也许有一些我看不到的东西,但我认为在div中设置data-role = page的数据主题应该为所有内容设置它:

<!DOCTYPE html> 
<html> 
    <head> 
    <title>Page Title</title> 

    <meta name="viewport" content="width=device-width, initial-scale=1"> 

    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head> 
<body> 

<div data-role="page" data-theme="b">

    <div data-role="header">
        <h1>Page Title</h1>
    </div><!-- /header -->

    <div data-role="content">   
        <p>Page content goes here.</p>      
    </div><!-- /content -->

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

但我仍然得到默认主题A.

我究竟做错了什么?或者这是一个错误?它工作在1 alpha 4但不是1 final.

小智 6

检查文档,http ://jquerymobile.com/demos/1.0/docs/pages/pages-themes.html它具体说:"但是,页眉和页脚将默认为主题"a".如果你想要一个页面例如,对于其所有元素,包括其页眉和页脚,只需要主题"b",您需要为页面div以及页眉和页脚div指定data-theme ="b".

所以这不是一个错误.