来源订购(Source Ordering)

优质
小牛编辑
126浏览
2023-12-01

描述 (Description)

源排序有助于在不同大小的屏幕中重新排列列。 使用order属性,列被排序到行中,即最低的数字排在第一位。

例子 (Example)

以下示例演示了在基础中使用Source Ordering -

<!DOCTYPE html>
<html>
   <head>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <title>Foundation Template</title>
      <link rel = "stylesheet" href = "css/foundation.css" />
      <script src = "js/vendor/jquery.min.js"></script>
      <script src = "js/foundation.min.js"></script>
   </head>
   <body>
      <h2>Example of Flex Grid</h2>
      <div class = "row">
         <div class = "column order-1 medium-order-2" style = "background-color:#8BD6EE;">
            Appears first on small screen
         </div>
         <div class = "column order-2 medium-order-1" style = "background-color:#7B68EE;">
            Appears second on small screen
         </div>
      </div>
   </body>
</html>