zoukankan      html  css  js  c++  java
  • FCC---CSS Flexbox: Use the flex-direction Property to Make a Row

    Adding display: flex to an element turns it into a flex container.

    This makes it possible to align any children of that element into rows or columns.

    You do this by adding the flex-direction property to the parent item and setting it to row or column.

    Creating a row will align the children horizontally, and creating a column will align the children vertically.

    Other options for flex-direction are row-reverse and column-reverse.

    Note: The default value for the flex-direction property is row.


    Add the CSS property flex-direction to the #box-container element, and give it a value of row-reverse.


    <style>
      #box-container {
        display: flex;
        height: 500px;
        flex-direction: row-reverse;
      }
      #box-1 {
        background-color: dodgerblue;
        width: 50%;
        height: 50%;
      }
    
      #box-2 {
        background-color: orangered;
        width: 50%;
        height: 50%;
      }
    </style>
    
    <div id="box-container">
      <div id="box-1"></div>
      <div id="box-2"></div>
    </div>

    from: 

     to: 

  • 相关阅读:
    底层原理
    No.1
    No.3
    No.0
    php 10进制转62进制,可用于短网址生成
    php实现斐波那契数列
    五种常见的 PHP 设计模式
    PHP利用MySQL保存session
    HTTP相关
    如何优化tomcat配置(从内存、并发、缓存4个方面)优化
  • 原文地址:https://www.cnblogs.com/jane-panyiyun/p/12008183.html
Copyright © 2011-2022 走看看