当前位置: 首页 > news >正文

Element-ui container常见布局

1、header\main布局

<template>
  <div>
    <el-container>
      <el-header>Header</el-header>
      <el-main>Main</el-main>
    </el-container>
  </div>
</template>
<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  </style>

2、header\main\footer布局

<template>
  <div>
    <el-container>
      <el-header>Header</el-header>
      <el-main>Main</el-main>
      <el-footer>Footer</el-footer>
    </el-container>
  </div>
</template>
<style>
  .el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  </style>

3、Aside/main布局

4、header/aside/main 布局

<template>
  <div>
    <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>
    </div>
</template>
<style>
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }
  body > .el-container {
    margin-bottom: 40px;
  }
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>

5、header/aside/main/footer布局

<template>
  <div>
    <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>
<style>
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }
  body > .el-container {
    margin-bottom: 40px;
  }
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>

6、aside/header/main/footer布局

<template>
  <div>
    <el-container>
      <el-aside width="200px">Aside</el-aside>
      <el-container>
        <el-header>Header</el-header>
        <el-main>Main</el-main>
        <el-footer>Footer</el-footer>
      </el-container>
    </el-container>
  </div>
</template>
<style>
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }
  body > .el-container {
    margin-bottom: 40px;
  }
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
 

http://www.lryc.cn/news/162771.html

相关文章:

  • ssm实现折线统计图
  • GLSL ES着色器 精度限定字
  • webrtc的FULL ICE和Lite ICE
  • flink的几种常见的执行模式
  • 蓝桥杯备赛Day8——队列
  • 用滑动条做调色板---cv2.getTrackbarPos(),cv2.creatTrackbar()
  • dubbo 服务注册使用了内网IP,而服务调用需要使用公网IP进行调用
  • 外传-Midjourney的局部重绘功能
  • Spring Boot 中使用 Poi-tl 渲染数据并生成 Word 文档
  • Java基础(二十一)十点半游戏
  • 第8节-PhotoShop基础课程-常用快捷键汇总
  • Redis带你深入学习数据类型set
  • Json“牵手”易贝商品详情数据方法,易贝商品详情API接口,易贝API申请指南
  • 《AI一键生成抖音商品种草文案》让你秒变带货王!
  • 博客系统(升级(Spring))(二)获取当前用户信息、对密码进行加密、设置统一数据格式、设置未登录拦截、线程池
  • Postman接口测试工具
  • appium+jenkins实例构建
  • c#中字段和属性的区别,委托和事件的区别
  • 香橙派使用外设驱动库wiringOP来驱动蜂鸣器
  • 微信小程序Day3笔记
  • 大数据技术之Hadoop:提交MapReduce任务到YARN执行(八)
  • [论文笔记]BiMPM
  • JS判断当前是早上,中午,下午还是晚上
  • 使用Docker部署Gitlab的记录
  • Spark【Spark SQL(二)RDD转换DataFrame、Spark SQL读写数据库 】
  • LabVIEW检测润滑油中的水分和铁颗粒
  • 【新版】系统架构设计师 - 软件架构设计<SOA与微服务>
  • React+Typescript+react-router 6 创建路由操作
  • 前端list.push,封装多个对象
  • 指令延迟隐藏