vue+ElementPlus框架Container 布局容器不能鋪滿整個屏幕的解決方案
更新時間:2024年01月26日 12:11:10 作者:菜鳥搬磚ヽ( ̄▽ ̄)?
這篇文章主要介紹了vue+ElementPlus框架Container 布局容器不能鋪滿整個屏幕的解決方案,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友參考下吧
vue+ElementPlus框架Container 布局容器不能鋪滿整個屏幕
<template>
<div class="common-layout">
<el-container>
<el-header>Header</el-header>
<el-container>
<el-aside width="200px">Aside</el-aside>
<el-container>
<el-main>Main</el-main>
<el-footer>Footer</el-footer>
</el-container>
</el-container>
</el-container>
</div>
</template>直接使用ElementPlus框架的Container 布局容器,在頁面中沒有鋪滿,查看可知,有padding20px,高度也只有一半,因此添加了scc。

.main {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
}
.common-layout { height: 100vh; }
到此這篇關(guān)于vue+ElementPlus框架Container 布局容器不能鋪滿整個屏幕的文章就介紹到這了,更多相關(guān)vue Container 布局容器內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue3向數(shù)組插入一條自定義數(shù)據(jù)實現(xiàn)方式
這篇文章主要介紹了vue3向數(shù)組插入一條自定義數(shù)據(jù)實現(xiàn)方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2025-09-09
Vue3后臺管理系統(tǒng)之創(chuàng)建和配置項目
后臺管理系統(tǒng)是我們?nèi)粘i_發(fā)學習經(jīng)常遇到的一個項目,下面這篇文章主要給大家介紹了關(guān)于Vue3后臺管理系統(tǒng)之創(chuàng)建和配置項目的相關(guān)資料,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2022-09-09

