jQuery Easy UI (適應螢幕解析度大小)布局(Layout)

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   os   使用   ar   sp   

一、jQuery Easy UI (適應螢幕解析度大小)布局(Layout)  

    1、首先應用的是jquery-easyui-1.4 版本(版本不同,相容性不同)

    2、實現整個頁面的布局( layout: north,south,west,east, center)

    3、首先整個頁面配置適應螢幕的解析度大小

    4、然後內容地區進行布局,也要適應螢幕解析度大小

    5、部分代碼:    

 1 <body> 2     <div class="easyui-layout" fit="true"> 3         <div data-options="region:‘north‘" style="height: 50px"> 4             <h3> 5                 標題位置</h3> 6         </div> 7         <div data-options="region:‘south‘,split:true" style="height: 50px;"> 8             <h3> 9                 底部位置</h3>10         </div>11         <div data-options="region:‘east‘,split:true" title="East" style="width: 200px;">12             <h3>13                 填充內容</h3>14         </div>15         <div data-options="region:‘west‘,split:true" title="West" style="width: 200px;">16             <h3>17                 導覽功能表位置</h3>18         </div>19         <div data-options="region:‘center‘">20             <%--注意:必須設定 屬性 fit="true"--%>21             <div id="tabs" class="easyui-tabs" fit="true">22                 <div id="home" title="歡迎使用" style="padding: 3px; overflow: hidden;">23                     <%-- 中間內容布局適應螢幕解析度大小 注意設定屬性 fit="true"--%>24                     <div class="easyui-layout" fit="true">25                         <%--如果左右布局必須設定一個的寬度 width--%>26                         <div id="p" data-options="region:‘west‘,title:‘左側位置‘,collapsible:false" style="width: 25%;27                             padding: 0px;">28                             <%--   如果裡面的內容也要適應螢幕解析度大小 需設定 width="100%" height="100%"--%>29                             <div id="departList">30                                 <h4>31                                     填充內容</h4>32                             </div>33                         </div>34                         <div data-options="region:‘center‘,title:‘右側位置‘">35                             <div id="departAddr">36                                 <h4>37                                     填充內容</h4>38                             </div>39                         </div>40                     </div>41                 </div>42                 <div title="Test" style="padding: 10px">43                     This is the Test work.44                 </div>45                 <div title="Help" data-options="iconCls:‘icon-help‘,closable:true" style="padding: 10px">46                     This is the help content.47                 </div>48             </div>49         </div>50     </div>51 </body>

 

    6、運行效果如下:

       

        

       

jQuery Easy UI (適應螢幕解析度大小)布局(Layout)

聯繫我們

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