在CSS的容器底部对齐flex项目

align-items属性与值flex-end一起使用, 以在底部对齐flex项目。

示例

您可以尝试运行以下代码来实现flex-end

<!DOCTYPE html>
<html>
   <head>
      <style>
         .mycontainer {
            display: flex;
            height: 300px;
            background-color: #5DADE2;
            align-items: flex-end;
         }
         .mycontainer > div {
            background-color: #F2F3F4;
            text-align: center;
            line-height: 60px;
            font-size: 30px;
            width: 100px;
            margin: 5px;
         }
      </style>
   </head>
   <body>
      <h1>SOCIAL SECURITY Numbers</h1>
      <div class = "mycontainer">
         <div>SS1</div>
         <div>SS2</div>
         <div>SS3</div>
         <div>SS4</div>
         <div>SS5</div>
         <div>SS6</div>
      </div>
   </body>
</html>