jQuery Moblie 頁面模版(基礎)

來源:互聯網
上載者:User

jQuery Mobile 是一個用來構建跨平台移動web應用程式的新UI架構,具有使用簡單的特點。在短短几分鐘內,你可以建立出能夠在當今可用的近乎所有手機、平板電腦、台式機和電子書閱讀程式裝置上啟動並執行最佳化行動裝置 App程式。  jQuery Mobile具備的一些重要特性:    1.  通用訪問;   2.  跨所有移動平台的統一UI   3. 簡化的標記驅動的開發   4.  漸進式增強   5. 響應式設計   6. 可主體化的設計   7. 可訪問性  基本的模版頁面:  <!DOCTYPE html> <html>     <head>     <meta charset="utf-8">    <title>Page Template</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 src="http://code.jquery.com/jquery-1.6.4.min.js"></script>    <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>    </head> <body>  <div data-role="page">    <div data-role="header">        <h1>Page Header</h1>    </div>     <div data-role="content">            <p>Hello jQuery Mobile!</p>    </div>     <div data-role="footer" data-position="fixed">        <h4>Page Footer</h4>    </div></div> </body></html>   device-width值表示,讓內容擴充到螢幕的整個寬度;initial-scale設定了用來查看Web頁面的初始縮放百分比或者縮放因數。    jQuery Mobile 的css會為所有的A級和B級瀏覽器應用風格的最佳化,可以根據需要自訂或添加自己的CSS   jQuery 庫是jQuery Mobile 的一個核心依賴,如果app需要更多的動態行為,則需要在移動頁面中使用jQuery的核心API;www.2cto.com  jQuery Mobile Javascript庫必須在jQuery和任何可能存在的自訂指令碼之後聲明。  data-role="header"是頁首或者標題列,該屬性是可選的; data-role="content"是內容主體的封裝容器,該屬性是可選的。 data-role="footer"包含頁尾欄,該屬性是可選的。      

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.