Order elasticity of the box

order

Order ORDER property set or retrieve the flexible pouch model object sub-element appears. .

Note: If the element is not resilient element box object, the property does not work order.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Flexbox Demo</title>
  <style>
    .container1 {
      height: 500px;
      display: flex;
      border: 2px solid #ccc;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
    }

    .item {
      width: 200px;
      height: 200px;
    }
  </style>
</head>
<body>
  <div class="container1">
    <div class="item" style="background-color: red;order: 1"></div>
    <div class="item" style="background-color: yellow;order: 1"></div>
    <div class="item" style="background-color: blue;order: -1"></div>
  </div>
</body>
</html>

Detailed View official explanation

Guess you like

Origin www.cnblogs.com/ygjzs/p/12043915.html