【问题标题】:jquery mobile data-theme not workingjquery移动数据主题不起作用
【发布时间】:2014-02-04 08:06:40
【问题描述】:

我有一个简单的登录页面,我正在尝试对其应用主题“b”,但它不起作用。页面看起来很暗,而不是主题 b 的样子。 有什么想法吗?

谢谢。



我的标题

    <link rel="shortcut icon" href="img/favicon.ico">
    <link rel="stylesheet" href="css/themes/default/jquery.mobile-1.4.0.min.css">        
    <!--<link href="css/ios_inspired/styles.css" rel="stylesheet" />-->
    <!--<link rel="stylesheet" href="css/jqm-demos.css">-->
    <script src="js/jquery.mobile-1.4.0/jquery.js"></script>        
    <script src="js/jquery.mobile-1.4.0/jquery.mobile-1.4.0.min.js"></script>

</head>
<body>


    <div data-role="page" id="Page_Login"  data-quicklinks="true" data-theme="b" >

        <div data-role="header" >
            <h1>My header</h1>                
        </div>

        <div role="main" class="ui-content jqm-content jqm-fullwidth" data-theme="b" >

            <h1 style=" text-align:center;">Connect</h1>                  

            <form dir="rtl">

                <!--<div data-role="fieldcontain" >-->
                 <label for="txtEmail">email:</label>
                 <input type="email" name="txtEmail" id="txtEmail" value="" />
                <!--</div> -->      

                <!--<div data-role="fieldcontain" >-->
                 <label for="txtPassword">password:</label>
                 <input type="password" name="txtPassword" id="txtPassword" value="" />
                <!--</div> --> 

                <a  href="" data-transition="flip" class="ui-btn ui-corner-all" onclick="MemberLogIn()">connect</a>                         
            </form>

        </div><!-- /content -->

    </div><!-- /page -->            

</body>

【问题讨论】:

    标签: jquery jquery-mobile


    【解决方案1】:

    更新

    应该升级经典主题以与 jQuery Mobile 1.4.x 一起正常工作

    Upgrade guide


    与旧版本的 jQuery Mobile 不同,最新版本 1.4 只有两个主题/色板 ab。后者是深色/黑色主题。

    1. 您可以使用ThemeRoller 创建自己的主题。

    2. 使用 jQuery Mobile 提供的经典样式表以及默认样式表。

      <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" />
      <link rel="stylesheet" href="http://demos.jquerymobile.com/1.4.0/theme-classic/theme-classic.css" />
      

    Demo

    【讨论】:

    • 我已经使用了你说的经典样式表,我的页面现在看起来像一个梦。非常感谢!
    • @Itay.B 不客气,我很高兴我能帮上忙 :) 确保在本地托管它,你永远不知道 jQM 何时删除它;)
    • 这并不是我想要的,但这个答案和这次谈话确实帮助我最终解决了这个问题。多谢你们!沙洛姆!
    • 非常感谢您的评论
    猜你喜欢
    • 2020-11-04
    • 1970-01-01
    • 2018-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多