jQueryMobile的組件——可展開項(collapsible),jquerymobile組件

來源:互聯網
上載者:User

jQueryMobile的組件——可展開項(collapsible),jquerymobile組件

data-role="collapsible"——指明div為可展開項組件;

data-collapsed="false"——初始化組件為展開狀態;

data-content-theme="false"——指明展開項內容為去掉邊框的樣式;

<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width,initial-scale=1.0">    <title>collapsible執行個體</title>    <script src="jquery-2.1.3.min.js"></script>    <script src="jquery.mobile-1.4.5.min.js"></script>    <link rel="stylesheet" href="jquery.mobile-1.4.5.min.css" type="text/css"></head><body><div data-role="page">    <div data-role="header" data-position="fixed">        <h1>歡迎來到首頁</h1>    </div>    <div data-role="content" >        <div data-role="collapsible" data-collapsed="false">            <h4>初始展開</h4>            <p>我展開了嗎?</p>        </div>        <div data-role="collapsible" data-content-theme="false">            <h4>預設收合</h4>            <p>我展開了嗎?</p>        </div>        <div data-role="collapsible">            <h1>清單項目</h1>            <ul data-role="listview">                <li><a href="#">item1</a></li>                <li><a href="#">item2</a></li>                <li><a href="#">item3</a></li>            </ul>        </div>    </div>    <div data-role="footer" data-position="fixed">        <h1>這是底部</h1>    </div></div></body></html>
在iPhone6中的效果:



著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.