jQuery Mobile 工具欄

 頁眉欄:通常包含標題/Logo,或一到兩個按鈕

               2個按鈕時,會自動分列兩側

           1個按鈕時,會默認位於左側

           會自動居中

           可設定按鈕位置:class="ui-btn-right"

               e.g. 

               <div data-role="header">

                    <h1>主頁</h1>   //自動居中

                   <a href="#"  data-role="button"  class="ui-btn-right">搜索</a>

            </div>

 頁腳欄:具伸縮性,能包含所需數量的按鈕

            居中: class="ui-btn"

            可以在頁腳中組合按鈕:data-role="controlgroup"  data-type="horizontal |vertical"

            e.g.

            <div data-role="footer"  class="ui-btn"> 

                    <div data-role="controlgroup"  data-type="horizontal">

                          <a href="#"  data-role="button"  data-icon="plus" >button1</a>

                          <a href="#"  data-role="button"  data-icon="minus" >button2</a> 

                          <a href="#"  data-role="button">button3</a>

                    </div>

            </div>

  定位頁眉和頁腳:(三種方式)

        inline:位於行內(默認) data-position="inline"

        fixed:固定置於項部和底部  data-position="fixed"   (觸摸屏幕可切換頁眉頁腳的隱藏和顯示)

        fullscreen:與fixed類似,同時,頁眉頁腳可呈透明顯示   (觸摸屏幕可切換頁眉頁腳的隱藏和顯示) -對於照片,圖像和視頻非常理想

                          data-position="fixed"  data-fullscreen="true"

        e.g.

        <div  data-role="header"  data-position="fixed"  data-fullscreen="true"></div>

        <div  data-role="footer"  data-position="fixed"  data-fullscreen="true"></div>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章