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组合实现精确布局方法介绍
- Android布局——Preference自定义layout的方法
- Android开发笔记 TableLayout常用的属性介绍
- Android中的android:layout_weight使用详解
- CoordinatorLayout的使用如此简单(Android)
相关文章
jQuery利用cookie 实现本地收藏功能(不重复无需多次命名)
cookie 是存储于访问者计算机中的变量。这篇文章主要介绍了jQuery利用cookie 实现本地收藏功能不重复无需多次命名,需要的朋友可以参考下2019-11-11
jackson解析json字符串,首字母大写会自动转为小写的方法
下面小编就为大家分享一篇jackson解析json字符串,首字母大写会自动转为小写的方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧2017-12-12
jQuery中$.ajax()和$.getJson()同步处理详解
这篇文章主要介绍了jQuery中$.ajax()和$.getJson()同步处理详解的相关资料,非常的细致全面,有需要的小伙伴可以参考下。2015-08-08


最新评论