基礎 - 列/行組合



說明

類在同一元素上使用,以獲取用作容器的完整寬度列。

示例

以下示例演示瞭如何在基礎中使用組合列/行類:-

<!DOCTYPE html>
<html>
   <head>
      <title>Foundation Template</title>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">

      <!-- Compressed CSS -->
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/css/foundation.min.css" crossorigin="anonymous">

      <!-- Compressed JavaScript -->
      <script src="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/js/foundation.min.js" crossorigin="anonymous"></script>
   </head>

   <body>
      <h3>Example of combined column and row</h3>

      <div class = "column row" style = "background-color:#8BD6EE;">
         Lorem Ipsum is simply dummy text of the printing and typesetting industry.
         Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
         when an unknown printer took a galley of type and scrambled it to make a type
         specimen book.
      </div>

   </body>
</html>

輸出

讓我們執行以下步驟,瞭解上面給出的程式碼是如何工作的:-

  • 將以上給出的 HTML 程式碼儲存到 combined_row_column.html 檔案。

  • 在瀏覽器中開啟此 HTML 檔案,顯示的輸出如下所示。

foundation_the_grid.htm
廣告
© . All rights reserved.