# コレクションの商品一覧ページ毎に背景の色を変更したい

**URL:** <https://community.shopify.com/t/topic/29326>\
**Category:** 技術的なQ＆A\
**Created:** [December 24, 2020, 1:04pm UTC](https://community.shopify.com/t/topic/29326 "2020-12-24T13:04:02Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

コレクションごとに商品一覧ページの背景色を変えられるか、という質問。使用テーマは Shopify の「Simple」です。

回答では、Simple のデモ環境を見る限り、各コレクションページの body タグにコレクション別の id と class が付与されている可能性があるため、それを CSS の条件分岐に使えば背景色を個別変更できるのではないかと示されました。

主なポイント:
- コレクション単位で識別できる body の id / class を利用する案
- テーマ本来の状態とデモでは差異がある可能性あり
- コードの具体例までは未提示

質問者はこの方法で実現の見通しが立ったとして前向きに受け止めており、議論は大きな対立なくほぼ解決方向です。ただし、実際の実装手順や CSS 記述の詳細は今後の確認事項として残っています。

<div class="post-metadata">

**Author:** ![noi](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@noi](https://community.shopify.com/u/noi)\
**Post date:** [December 24, 2020, 1:04pm UTC](https://community.shopify.com/t/topic/29326/1 "2020-12-24T13:04:02Z")

</div>

上記件名の通りなのですが、コレクションの商品一覧ページ毎に背景の色を変更したいのですが可能でしょうか？

テーマはsimpleを使用しています。

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [December 25, 2020, 10:51am UTC](https://community.shopify.com/t/topic/29326/2 "2020-12-25T10:51:09Z")

</div>

Simpleのデモページ( [https://simpletheme-light.myshopify.com/collections/accessories](https://simpletheme-light.myshopify.com/collections/accessories) )での確認なので本来の状態とは違うかもしれませんが、コレクションごとにbodyタグにidとクラスが設定されているようなのでそれが利用できるのではと思います。

```markup

```

---

<div class="post-metadata">

**Author:** ![noi](https://avatars.discourse-cdn.com/v4/letter/n/d78d45/32.png) [@noi](https://community.shopify.com/u/noi)\
**Post date:** [December 25, 2020, 1:40pm UTC](https://community.shopify.com/t/topic/29326/3 "2020-12-25T13:40:43Z")

</div>

アクセサリーごとにIDができてるんですね！

ありがとうございます！光が見えました！
