jqeury-easyui-layout問題解決方法
更新時(shí)間:2014年03月24日 15:43:12 作者:
jqeury-easyui-layout問題:當(dāng)把class=“easyui-layout”寫在一個(gè)獨(dú)立的div中時(shí),layout的樣式無法顯示,具體示例如下
今天在用easyui做布局時(shí),碰到了一個(gè)疑惑的問題。
問題:當(dāng)把class=“easyui-layout”寫在一個(gè)獨(dú)立的div中時(shí),layout的樣式無法顯示,也不報(bào)錯(cuò)。
例如:
<span style="font-size:14px;"><body >
<div class="easyui-layout">
<div data-options="region:'north',title:'North Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'south',title:'South Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width: 100px;">
</div>
<div data-options="region:'west',title:'West',split:true" style="width: 100px;">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</div>
</body></span>
顯示:
解決:把class=“easyui-layout”寫在body中時(shí),問題就迎刃而解了。且region屬性不能被其他無關(guān)的div所包含。
代碼:
<span style="font-size:14px;"><body class="easyui-layout">
<div data-options="region:'north',title:'North Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'south',title:'South Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width: 100px;">
</div>
<div data-options="region:'west',title:'West',split:true" style="width: 100px;">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</body></span>
一直在想這是為什么?
問題:當(dāng)把class=“easyui-layout”寫在一個(gè)獨(dú)立的div中時(shí),layout的樣式無法顯示,也不報(bào)錯(cuò)。
例如:
復(fù)制代碼 代碼如下:
<span style="font-size:14px;"><body >
<div class="easyui-layout">
<div data-options="region:'north',title:'North Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'south',title:'South Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width: 100px;">
</div>
<div data-options="region:'west',title:'West',split:true" style="width: 100px;">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</div>
</body></span>
顯示:

解決:把class=“easyui-layout”寫在body中時(shí),問題就迎刃而解了。且region屬性不能被其他無關(guān)的div所包含。
代碼:
復(fù)制代碼 代碼如下:
<span style="font-size:14px;"><body class="easyui-layout">
<div data-options="region:'north',title:'North Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'south',title:'South Title',split:true" style="height: 100px;">
</div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width: 100px;">
</div>
<div data-options="region:'west',title:'West',split:true" style="width: 100px;">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</body></span>

一直在想這是為什么?
您可能感興趣的文章:
- jQuery布局插件UI Layout簡(jiǎn)介及使用方法
- android layout 按比例布局的代碼
- 基于AnDroid FrameLayout的使用詳解
- jQuery EasyUI 中文API Layout(Tabs)
- SWT(JFace)體驗(yàn)之GridLayout布局
- android LinearLayout和RelativeLayout組合實(shí)現(xiàn)精確布局方法介紹
- Android布局——Preference自定義layout的方法
- Android開發(fā)筆記 TableLayout常用的屬性介紹
- Android中的android:layout_weight使用詳解
- CoordinatorLayout的使用如此簡(jiǎn)單(Android)
相關(guān)文章
hovertree插件實(shí)現(xiàn)二級(jí)樹形菜單(簡(jiǎn)單實(shí)用)
hovertree是一個(gè)仿京東的樹形菜單jquery插件,暫時(shí)有銀色和綠色兩種。本文將對(duì)此進(jìn)行介紹。具有一定的參考價(jià)值,下面跟著小編一起來看下吧2016-12-12基于JQuery實(shí)現(xiàn)的Select級(jí)聯(lián)
Select級(jí)聯(lián),想必大并不陌生吧,本文為大家介紹下使用jquery是如何快速實(shí)現(xiàn)的,希望對(duì)大家有所幫助2014-01-01JQuery Study Notes 學(xué)習(xí)筆記(一)
jquery是當(dāng)前比較流行的js類庫,學(xué)習(xí)它可以實(shí)現(xiàn)很多功能。2010-08-08jQuery對(duì)象的selector屬性用法實(shí)例
這篇文章主要介紹了jQuery對(duì)象的selector屬性用法,實(shí)例分析了selector屬性返回選擇器的使用技巧,具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2014-12-12

jQuery基于Ajax實(shí)現(xiàn)讀取XML數(shù)據(jù)功能示例
這篇文章主要介紹了jQuery基于Ajax實(shí)現(xiàn)讀取XML數(shù)據(jù)功能,結(jié)合實(shí)例形式分析了jQuery基于ajax的get方式獲取xml文件數(shù)據(jù)并輸出顯示相關(guān)操作技巧,需要的朋友可以參考下
2018-05-05 
jQuery實(shí)現(xiàn)仿路邊燈箱廣告圖片輪播效果
本文給大家介紹的是使用jQuery實(shí)現(xiàn)仿路邊燈箱廣告圖片輪播切換特效,效果非常棒,有需要的小伙伴可以參考下。
2015-04-04