> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/blocks/cards.md).

# カード

画像の有無にかかわらず、一連のカードでより動的に情報を表示します

カードを使うと、テキストと画像をグリッド状に組み合わせた、見た目に美しいページレイアウトを作成できます。ランディングページの作成や、その他のコンテンツを非線形に表示するのに最適です。

できます。 [カードを中サイズと大サイズに切り替え](#changing-the-size-of-cards) 関連するリソースにリンクできます。

### カードの例

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">カバー画像</th><th data-hidden data-type="image">カバー画像（ダーク）</th><th data-hidden data-type="image">カバー画像（ダーク）</th><th data-hidden data-card-cover-dark data-type="image">カバー画像（ダーク）</th></tr></thead><tbody><tr><td><strong>GitBookのホームページ</strong></td><td>当社のウェブサイトにアクセスして、GitBookの詳細をご覧ください。</td><td><a href="https://www.gitbook.com/">https://www.gitbook.com/</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-50d99439ff1e20b164b604793fe65e986bdb3d4c%2F25_12_10_cards_3.png?alt=media">25_12_10_cards_3.png</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-d51ff4f65e39b788e09efcccf617cff7514dfc04%2F25_12_10_cards_2.png?alt=media">25_12_10_cards_2.png</a></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-d51ff4f65e39b788e09efcccf617cff7514dfc04%2F25_12_10_cards_2.png?alt=media">25_12_10_cards_2.png</a></td></tr><tr><td><strong>開発者向けドキュメント</strong></td><td>独自のGitBook連携を構築しましょう。</td><td><a href="https://developer.gitbook.com/">https://developer.gitbook.com/</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-750f34dc35be306ea8c19106f346a8253df28420%2F25_12_10_cards_1.png?alt=media">25_12_10_cards_1.png</a></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-175e39a8623f4a66cca9c54fdeb7f7e55342c39b%2F25_12_10_cards.png?alt=media">25_12_10_cards.png</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-175e39a8623f4a66cca9c54fdeb7f7e55342c39b%2F25_12_10_cards.png?alt=media">25_12_10_cards.png</a></td></tr><tr><td><strong>GitBookにサインアップ</strong></td><td>無料で始めましょう。</td><td><a href="https://app.gitbook.com/join">https://app.gitbook.com/join</a></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-89a5dd251f6d5434e441f09add65eaff2638b95d%2F25_12_10_cards_5.png?alt=media">25_12_10_cards_5.png</a></td><td></td><td></td><td><a href="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-918fb295e6669005661e2d16527566a9bdf677a8%2F25_12_10_cards_4.png?alt=media">25_12_10_cards_4.png</a></td></tr></tbody></table>

### リンクの追加 <a href="#adding-links-and-images-to-your-cards" id="adding-links-and-images-to-your-cards"></a>

カードにカーソルを合わせて、 **オプションメニュー** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt="The Options menu icon in GitBook"></picture>を開きます。ここでリンク先を追加すると、読者はカードをクリックして目的の場所に直接移動できます。

{% hint style="success" %}
カードを作成する際は、 **ハイパーリンクではなくリンク先を使う**ことをおすすめします。リンク先を設定すると、カードのどこをクリックしても、リンク先のURLにアクセスできます。
{% endhint %}

### 画像の追加

カードにカーソルを合わせて、 **オプションメニュー** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt="The Options menu icon in GitBook"></picture>を開きます。ここでカードにカバー画像を追加できます。または、カード自体の **カバー画像を追加** オプションをクリックします。

すると、 **ファイルを選択** モーダルが開きます。ここに新しい画像をドラッグ＆ドロップするか、セクションに以前アップロードした画像ファイルを使用できます。

#### ダークモード用の画像を追加する

ダークモードでのみ表示されるカバー画像も追加できます。

この操作を行うには、カードの **オプションメニュー** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt=""></picture> を開き、 **カバー** > **カバーを編集** > **ダークモード用のカバーを追加**を選択します。すると、 **ファイルを選択** モーダルが開き、新しい画像をドラッグ＆ドロップするか、以前アップロードした画像を選択できます。

#### 適切な画像サイズを選ぶ

GitBookでは、横長画像はデスクトップとモバイルの両方で自動的に16:9比率にトリミングされます。アップロードした画像が縦長、または1:1比率の場合、デスクトップでは16:9にトリミングされ、モバイルでは正方形または縦長として表示されます。

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-accc608138df1f2b65e1bb5f52591ed1e2fae500%2F26_01_06_cards_desktop%402x.png?alt=media" alt="A GitBook screenshot showing card images on desktop"><figcaption><p>デスクトップでは、カード画像はサイズに関係なくすべて横長の16:9比率で表示されます。統一感を保つため、同じサイズを使用することをおすすめします。</p></figcaption></figure>

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-a07138ec9e654e4a0cf94d5d076b233439187d28%2F26_01_06_cards_mobile%402x.png?alt=media" alt="A GitBook screenshot showing card images on mobile"><figcaption><p>モバイルでは、正方形または縦長の画像は左のように表示されます。横長の画像は右のように表示されます。</p></figcaption></figure>

デスクトップとモバイル全体で一貫性を保つため、カード用の画像はすべて16:9形式（例: 1920px × 1080px）でアップロードすることをおすすめします。

カードのレイアウトを画面サイズに応じて変えたい場合は、1:1比率の画像をアップロードし、画像の内容を中央に配置することをおすすめします。

### カードのサイズを変更する

カードブロックの左側にある **オプションメニュー** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt="The Options menu icon in GitBook"></picture> を開くと、カードのサイズを選択できます。 **中** を選択すると、横一列にカードが3枚表示され、 **大** を選択すると、各行に大きなカードが2枚表示されます。

### Markdownでの表現

```markdown
<table data-view="cards">
  <thead>
    <tr>
      <th></th>
      <th></th>
      <th data-hidden data-card-target data-type="content-ref"></th>
      <th data-hidden data-card-cover data-type="files"></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>例のタイトル 1</strong></td>
      <td>例の説明 1。</td>
      <td><a href="https://example.com">https://example.com</a></td>
      <td><a href="https://example.com/image1.svg">example_image1.svg</a></td>
    </tr>
    <tr>
      <td><strong>例のタイトル 2</strong></td>
      <td>例の説明 2。</td>
      <td><a href="https://example.com">https://example.com</a></td>
      <td><a href="https://example.com/image2.svg">example_image2.svg</a></td>
    </tr>
    <tr>
      <td><strong>例のタイトル 3</strong></td>
      <td>例の説明 3。</td>
      <td><a href="https://example.com">https://example.com</a></td>
      <td><a href="https://example.com/image3.svg">example_image3.svg</a></td>
    </tr>
  </tbody>
</table>
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/ja-gitbook-documentation/kontentsuwosuru/blocks/cards.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
