jqeury-easyui-layout問題解決方法
更新時間:2014年03月24日 15:43:12 作者:
jqeury-easyui-layout問題:當把class=“easyui-layout”寫在一個獨立的div中時,layout的樣式無法顯示,具體示例如下
今天在用easyui做布局時,碰到了一個疑惑的問題。
問題:當把class=“easyui-layout”寫在一個獨立的div中時,layout的樣式無法顯示,也不報錯。
例如:
<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中時,問題就迎刃而解了。且region屬性不能被其他無關的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>
一直在想這是為什么?
問題:當把class=“easyui-layout”寫在一個獨立的div中時,layout的樣式無法顯示,也不報錯。
例如:
復制代碼 代碼如下:
<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中時,問題就迎刃而解了。且region屬性不能被其他無關的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>

一直在想這是為什么?
您可能感興趣的文章:
- jQuery布局插件UI Layout簡介及使用方法
- android layout 按比例布局的代碼
- 基于AnDroid FrameLayout的使用詳解
- jQuery EasyUI 中文API Layout(Tabs)
- SWT(JFace)體驗之GridLayout布局
- android LinearLayout和RelativeLayout組合實現(xiàn)精確布局方法介紹
- Android布局——Preference自定義layout的方法
- Android開發(fā)筆記 TableLayout常用的屬性介紹
- Android中的android:layout_weight使用詳解
- CoordinatorLayout的使用如此簡單(Android)
相關文章
hovertree插件實現(xiàn)二級樹形菜單(簡單實用)
hovertree是一個仿京東的樹形菜單jquery插件,暫時有銀色和綠色兩種。本文將對此進行介紹。具有一定的參考價值,下面跟著小編一起來看下吧2016-12-12基于JQuery實現(xiàn)的Select級聯(lián)
Select級聯(lián),想必大并不陌生吧,本文為大家介紹下使用jquery是如何快速實現(xiàn)的,希望對大家有所幫助2014-01-01jQuery基于Ajax實現(xiàn)讀取XML數(shù)據功能示例
這篇文章主要介紹了jQuery基于Ajax實現(xiàn)讀取XML數(shù)據功能,結合實例形式分析了jQuery基于ajax的get方式獲取xml文件數(shù)據并輸出顯示相關操作技巧,需要的朋友可以參考下2018-05-05