zoukankan      html  css  js  c++  java
  • flex属性介绍

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            .outer{
                 300px;
                border: 2px solid red;
                line-height: 100px;
                text-align: center;
                /* 设置元素为弹性容器 */
                display: flex;
                /* 设置弹性元素是否在弹性容器中自动换行 
                   可选值: nowrap 默认值 元素不会自动换行
                           wrap 元素沿辅轴方向自动换行*/
                flex-wrap: nowrap;
                /* 弹性元素在容器中反向水平排列 
                        可选值:row 默认值 水平排列 从左到右 根据国家的书写习惯而定
                               row-reverse 弹性元素在容器中反向水平排列
                               column 弹性元素纵向排列(自上向下)
                               column-reverse 弹性元素 反向纵向排列(自下向上)*/
                flex-direction: column-reverse;
        
            }
            .outer div{
                 200px;
                height: 100px;
                background-color: burlywood;
                /* 指定弹性元素的收缩系数
                  0表示不收缩 */
                /* flex-shrink: 0; */
                
            }
            .outer .box2{
                background-color: chartreuse;
            }
            .outer .box3{
                background-color: darkgoldenrod;
            }
        </style>
    </head>
    <body>
        <div class="outer">
            <div class="box1">111</div>
            <div class="box2">222</div>
            <div class="box3">333</div>
        </div>
    </body>
    </html>
  • 相关阅读:
    常量的定义
    二进制、八进制、十进制、十六进制间的转换
    使用简单的 5 个步骤设置 Web 服务器集群
    新手推荐:IIS+PHP+MYSQL环境配置教程
    windows7 iis安装与配置
    web服务器配置方法
    如何配置web服务器
    系统没有“internet信息服务(IIS)管理器”
    Html 内嵌 选择器属性 Dom操作 JavaScript 事件
    <转载>使用css让大图片不超过网页宽度
  • 原文地址:https://www.cnblogs.com/kukai/p/12336158.html
Copyright © 2011-2022 走看看