zoukankan      html  css  js  c++  java
  • flex

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    section {
       80%;
      height: 200px;
      border: 1px solid pink;
      margin: 100px auto;
      /*父盒子添加 flex*/
      display: flex; /*伸缩布局模式*/
      min- 500px;
      flex-direction: row-reverse; /*给父盒子添加 排列方式 可以是水平 也可以 是 垂直*/
      /* flex-direction: column; *//*垂直排列*/
    }

    section div:nth-child(1) {
      background-color: pink;
       200px;
    }
    section div:nth-child(2) {
      background-color: purple;
      margin: 0 5px;
       100px;
    }
    section div:nth-child(3) {
      background-color: pink;
      flex: 1;/*子盒子添加分数*/
    }
    section div:nth-child(4) {
      background-color: skyblue;
      flex: 1;/*子盒子添加分数*/
    }
    </style>
    </head>
    <body>
    <section>
      <div>1</div>
      <div>2</div>
      <div>3</div>
      <div>4</div>
    </section>
    </body>
    </html>

  • 相关阅读:
    静态方法、类方法、属性方法
    B-tree/B+tree
    支付宝
    七牛云上传视频3
    测试理论
    测试理论
    Xshell上传文件
    iptables增加、删除、修改、查询、保存防火墙策略教程
    docker私有仓库常用命令
    centos7修改主机名
  • 原文地址:https://www.cnblogs.com/pxxdbk/p/12560276.html
Copyright © 2011-2022 走看看