一、Element UI Container 布局容器 布滿全屏:
1、需要給包裹的div一個(gè)height:100%
2、給#app,html,body,.el-container一個(gè)height:100%
3、給el-container設(shè)置direction="vertical",因?yàn)榘琺ain和footer
二、頭部和側(cè)邊欄固定 el-main可滾動(dòng)文章來源:http://www.zghlxwxcb.cn/news/detail-511181.html
<el-container>
<el-header>Header</el-header>
<el-container>
<el-aside width="200px">Aside</el-aside>
<el-main>Main</el-main>
</el-container>
</el-container>
給內(nèi)容區(qū)域的container加樣式 **?height: calc(100vh - 頭部的高度);
文章來源地址http://www.zghlxwxcb.cn/news/detail-511181.html
到了這里,關(guān)于Element UI Container 布局容器 布滿全屏, 頭部和側(cè)邊欄固定 el-main可滾動(dòng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!