> For the complete documentation index, see [llms.txt](https://docs.webmix.cc/css-animation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webmix.cc/css-animation/3.-duo-lan-pai-ban-mo-shi-column.md).

# 3. 多欄排版模式 Column

## column-count 設定欄數

預設值是 `auto`，可設定欄數：

```css
div.block{
  column-count: 3;
}
```

例：

{% embed url="<https://codepen.io/carlos411/pen/ExZWOYV>" %}

## column-fill 設定如何填滿欄

* `balance`：預設值，各欄的內容會儘可能平均。
* `auto`：內容會到達高度之後，才會到下一欄。

例：

{% embed url="<https://codepen.io/carlos411/pen/gOgmQae>" %}

## column-gap 設定欄間距

預設值是 `normal`。

例：

{% embed url="<https://codepen.io/carlos411/pen/VwPpVjz>" %}

## column-rule 設定欄之間的直線樣式

跟 `border` 的屬性值寫法相同。

例：

{% embed url="<https://codepen.io/carlos411/pen/ZELemLY>" %}

## column-span 跨欄呈現

* `none`：預設值。
* `all`：設定跨欄呈現。

例：

{% embed url="<https://codepen.io/carlos411/pen/XWpMygd>" %}

## column-width 設定欄寬

設定了 `column-width`，就不建議設定 `column-count`。

例：

{% embed url="<https://codepen.io/carlos411/pen/KKaWrXP>" %}

## 練習：瀑布流版型

建立 `waterfall.html` 檔案，輸入以下：

```markup
<div class="column_block">
  
  <div class="column_item">
    1
    <img src="https://dummyimage.com/300x100/ccc/aaa">
  </div>
</div>
```

然後以 `div.column_item` 為單位，多複製一些，改變內容數字`1`以及圖片寬高 `300x100`。

例：

{% embed url="<https://codepen.io/carlos411/pen/ZELpdEL>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webmix.cc/css-animation/3.-duo-lan-pai-ban-mo-shi-column.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
