技術ブログ

#blog

DAWNの商品写真のズームアイコンの位置を変更する

ShopifyのDAWNテーマで、商品写真のズームアイコンの位置を変更する方法を解説します。

「アセット」フォルダ内のsection-main-product.cssファイルを編集します。

具体的には、以下のコードを探してきて、

.product__media-icon,
.thumbnail__badge {
  background-color: rgb(var(--color-background));
  border-radius: 50%;
  border: 0.1rem solid rgba(var(--color-foreground), 0.1);
  color: rgb(var(--color-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  z-index: 1;
  transition: color var(--duration-short) ease, opacity var(--duration-short) ease;
}

leftをrightに、topをbottomに変更します。

.product__media-icon,
.thumbnail__badge {
  background-color: rgb(var(--color-background));
  border-radius: 50%;
  border: 0.1rem solid rgba(var(--color-foreground), 0.1);
  color: rgb(var(--color-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  width: 3rem;
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 1;
  transition: color var(--duration-short) ease,
    opacity var(--duration-short) ease;
}

まずは出張相談をご利用ください。
岩手県内は無料で訪問します。

ホームページやSNSに関するお悩みは、お気軽にご相談ください。
スタッフが御社を訪問し、お話を伺います。費用はかかりませんので、ご安心ください。

強引な営業は一切いたしません

0120-501-764

受付時間:平日 9:00〜18:00

岩手県内どこでも伺います。オンライン相談や、メールのみでのご相談も承ります。