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簡介及使用方法
- 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的使用如此簡單(Android)
相關(guān)文章
jQuery實(shí)現(xiàn)的進(jìn)度條效果
本文主要給大家介紹的是jQuery實(shí)現(xiàn)的進(jìn)度效果的實(shí)例代碼,其實(shí)現(xiàn)原理就是使用 Javascript 控制 SPAN CSS 的寬度(以及其他的樣式)有需要的小伙伴可以參考下。2015-07-07
jQuery利用cookie 實(shí)現(xiàn)本地收藏功能(不重復(fù)無需多次命名)
cookie 是存儲(chǔ)于訪問者計(jì)算機(jī)中的變量。這篇文章主要介紹了jQuery利用cookie 實(shí)現(xiàn)本地收藏功能不重復(fù)無需多次命名,需要的朋友可以參考下2019-11-11
jQuery自定義動(dòng)畫函數(shù)實(shí)例詳解(附demo源碼)
這篇文章主要介紹了jQuery自定義動(dòng)畫函數(shù)實(shí)現(xiàn)方法,形式實(shí)例分析了jQuery通過插件結(jié)合數(shù)學(xué)運(yùn)算實(shí)現(xiàn)滑塊動(dòng)畫運(yùn)動(dòng)的效果,并附完整demo源碼供讀者下載,需要的朋友可以參考下2015-12-12
jackson解析json字符串,首字母大寫會(huì)自動(dòng)轉(zhuǎn)為小寫的方法
下面小編就為大家分享一篇jackson解析json字符串,首字母大寫會(huì)自動(dòng)轉(zhuǎn)為小寫的方法,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12
jQuery中$.ajax()和$.getJson()同步處理詳解
這篇文章主要介紹了jQuery中$.ajax()和$.getJson()同步處理詳解的相關(guān)資料,非常的細(xì)致全面,有需要的小伙伴可以參考下。2015-08-08
jQuery實(shí)現(xiàn)圖片上傳預(yù)覽效果功能完整實(shí)例【測試可用】
這篇文章主要介紹了jQuery實(shí)現(xiàn)圖片上傳預(yù)覽效果功能,結(jié)合完整實(shí)例形式分析了jQuery處理圖片上傳預(yù)覽相關(guān)事件響應(yīng)、瀏覽器判斷、圖片及頁面元素動(dòng)態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2018-05-05

