Today, when I used easyui for layout, I encountered a problem.
Problem: When you write class = "easyui-layout" in an independent div, the layout style cannot be displayed and no error is reported.
For example:
Copy codeThe Code is as follows:
<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: 'southtitle', 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: 'centertitle'" href = "CenterPage.html" style = "background: # eee; overflow: hidden;">
</Div>
</Div>
</Body> </span>
Display:
Solution: When you write class = "easyui-layout" in the body, the problem is solved. The region attribute cannot be contained by other irrelevant div.
Code:
Copy codeThe Code is as follows:
<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: 'southtitle', 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: 'centertitle'" href = "CenterPage.html" style = "background: # eee; overflow: hidden;">
</Div>
</Body> </span>
Why?