Today, when I was using easyi to make layouts, I encountered a question.
Problem: When class="easyui-layout" is written in an independent div, the layout style cannot be displayed and there is no error.
For example:
The code copy is as follows:
<span style="font-size:14px;"><body >
<div>
<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">
</div>
<div data-options="region:'west',title:'West',split:true">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</div>
</body></span>
show:
Solution: When class="easyui-layout" is written in the body, the problem is solved. And the region attribute cannot be included in other irrelevant divs.
Code:
The code copy is as follows:
<span style="font-size:14px;"><body>
<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">
</div>
<div data-options="region:'west',title:'West',split:true">
</div>
<div data-options="region:'center',title:'center title'" href="CenterPage.html" style="background: #eee; overflow: hidden;">
</div>
</body></span>
Always wondering why this is?