今日、私が簡単にレイアウトを作るために簡単に使用していたとき、私は質問に遭遇しました。
問題:class = "easyui-layout"が独立したdivで書かれている場合、レイアウトスタイルを表示することはできず、エラーはありません。
例えば:
コードコピーは次のとおりです。
<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" stiled = "background:#eee; overflow:hidden;">
</div>
</div>
</body> </span>
見せる:
解決策:class = "easyui-layout"が身体に書かれている場合、問題は解決されます。また、地域の属性を他の無関係なdivに含めることはできません。
コード:
コードコピーは次のとおりです。
<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" stiled = "background:#eee; overflow:hidden;">
</div>
</body> </span>
なぜこれがなぜなのか疑問に思っていますか?