zoukankan      html  css  js  c++  java
  • 布局:flex弹性布局_实践01

    <!doctype html>
    <html>
      <head>
          <meta charset="utf-8" />
          <title>H5标准页面</title>
          <link href="css/css实现树形图 - 副本 (2).css" rel="stylesheet" type="text/css" />
      </head>
    
      <body>
    
          <section>
              <article>
                  <div>1</div>
              </article>
          </section>
    
      </body>
    
    </html
    section{
        position:absolute;
        height:100%;
        width:100%;
        background-color:pink;
        display:-webkit-flex;
        display:flex;
        justify-content:center;
        align-items:center;
    }
    
    article{
        height:200px;
        width:200px;
        background-color:deeppink;
        margin:10px;
    }

    <!doctype html>
    <html>
      <head>
    	<meta charset="utf-8" />
    	<title>H5标准页面</title>
    	<link href="css/css实现树形图 - 副本 (2).css" rel="stylesheet" type="text/css" />
      </head>
    
      <body>
    	<section>
    		<article>
    			<div>1</div>
    		</article>
    		<article>
    			<div>2</div>
    		</article>
    	</section>
      </body>
    </html>
    

     

    section{
        position:absolute;
        height:100%;
        width:100%;
        background-color:pink;
        display:-webkit-flex;
        display:flex;
        justify-content:space-between;
    }
    
    article{
        height:200px;
        width:200px;
        background-color:deeppink;
        margin:10px;
    }
    
    article:nth-child(2){
        align-self:flex-end;
    }

    <!doctype html>
    <html>
        <head>
        <meta charset="utf-8" />
        <title>H5标准页面</title>
        <link href="css/css实现树形图 - 副本 (2).css" rel="stylesheet" type="text/css" />
      </head>
    
      <body>
         <section>
              <article>
                  <div>1</div>
              </article>
              <article>
                  <div>2</div>
              </article>
              <article>
                  <div>3</div>
              </article>
          </section>
      </body>
    </html
    section{
        position:absolute;
        height:100%;
        width:100%;
        background-color:pink;
        display:-webkit-flex;
        display:flex;
        justify-content:space-between;
    }
    
    article{
        height:200px;
        width:200px;
        background-color:deeppink;
        margin:10px;
    }
    
    article:nth-child(2){
        align-self:center;
    }
    
    article:nth-child(3){
        align-self:flex-end;
    }

    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>H5标准页面</title>
        <link href="css/css实现树形图 - 副本 (2).css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
        <section>
            <div class="customWrap">
                <article>
                    <div>1</div>
                </article>
                <article>
                    <div>2</div>
                </article>
            </div>
            <div class="customWrap">
                <article>
                    <div>3</div>
                </article>
                <article>
                    <div>4</div>
                </article>
            </div>
        </section>
    </body>
    
    </html>
    section{
        position:absolute;
        height:100%;
        width:100%;
        background-color:pink;
        display:-webkit-flex;
        display:flex;
        justify-content:space-between;
    }
    
    .customWrap{
        display:-webkit-flex;
        display:flex;
        flex-direction:column;
        justify-content:space-between;
    }
    
    article{
        height:200px;
        width:200px;
        background-color:deeppink;
        margin:10px;
    }

    <!doctype html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>H5标准页面</title>
        <link href="css/css实现树形图 - 副本 (2).css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
        <section>
    <div class="customWrap"> <article> <div>1</div> </article> <article> <div>2</div> </article> </div>
    <div class="customWrap"> <article> <div>5</div> </article> </div>
    <div class="customWrap"> <article> <div>3</div> </article> <article> <div>4</div> </article> </div> </section> </body> </html>
    section{
        position:absolute;
        height:100%;
        width:100%;
        background-color:pink;
        display:-webkit-flex;
        display:flex;
        justify-content:space-between;
    }
    
    .customWrap{
        display:-webkit-flex;
        display:flex;
        flex-direction:column;
        justify-content:space-between;
    }
    .customWrap:nth-child(2){
        justify-content:center;
    }
    
    article{
        height:200px;
        width:200px;
        background-color:deeppink;
        margin:10px;
    }

  • 相关阅读:
    JavaScript高级
    MVC分页
    MySQL8版本grant报错:ERROR 1410 (42000)
    binlog2sql安装及用法简介
    Redis内存碎片优化参数
    Redis工具redis-rdb-tools和redisimp
    从MySQL全备中恢复单库或单表数据
    linux登录时候提示字符集有问题
    Redis启停脚本
    linux修改当前用户环境变量永久生效
  • 原文地址:https://www.cnblogs.com/jiunie/p/11328143.html
Copyright © 2011-2022 走看看