css响应式布局左、右上、右中布局

一、布局效果

二、布局代码

      <div class="parent">
        <div class="left">菜单</div>
        <div class="right">
            <div class="right-top">顶部导航</div>
            <div class="right-content"></div>
        </div>
      </div>

三、css样式

      .parent {
        display: flex;
        flex-direction: row;
        width:100%;
        height:100vh;
      }

      .left{
        width: 15%;
        height: 100%;
        background-color: aqua;
        text-align: center;
      }

      .right{
         flex: 1; 
         display: flex;
         height: 100%;
         flex-direction: column; 
      }
      .right-top{
        height: 10%;
        background-color: blueviolet;
      }
     .right-content{
        flex: 1;
        background-color:darkkhaki;
        overflow: auto;
      }

  

相关推荐

  1. css 响应布局重学笔记

    2024-05-04 09:26:01       37 阅读
  2. CSS Flexbox与Grid:构建响应布局的艺术

    2024-05-04 09:26:01       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-04 09:26:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-04 09:26:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-04 09:26:01       87 阅读
  4. Python语言-面向对象

    2024-05-04 09:26:01       96 阅读

热门阅读

  1. MongoDB聚合运算符:$tanh

    2024-05-04 09:26:01       38 阅读
  2. Python教程:深入理解Python中的命名空间和作用域

    2024-05-04 09:26:01       35 阅读
  3. C语言结课总结与示例代码

    2024-05-04 09:26:01       33 阅读
  4. Centos 常见的命令

    2024-05-04 09:26:01       36 阅读
  5. CMakeLists.txt 简单地语法介绍

    2024-05-04 09:26:01       35 阅读
  6. Electron试用 SQLite

    2024-05-04 09:26:01       39 阅读