下面是经典的elementui布局容器
<el-container>
<el-header>Header</el-header>
<el-container>
<el-aside>
<leftSide></leftSide>
</el-aside>
<el-main>
<router-view/>
</el-main>
</el-container>
</el-container>
css核心是给.el-container加align-items: stretch;
布局css如下
.el-header {
background-color: #B3C0D1;
color: #333;
height: 60px;
}
.el-container {
align-items: stretch;
min-height: calc(100vh - 60px);
.el-aside {
background-color: #D3DCE6;
color: #333;
}
.el-main {
background-color: #E9EEF3;
color: #333;
}
}
网友评论