技術ブログ

#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;
}

この記事を書いた人

鎌田威

株式会社ナレッジサービス
代表取締役 鎌田威

2020年にフリーランスとして独立後、2022年に株式会社ナレッジサービスを設立。Webサイトのディレクションからデザイン、コーディングまで一気通貫で手がける。特にWordPressとShopifyを用いたWebサイト構築を得意とし、企業のDX推進やEコマース支援に多数の実績を持つ。

また、花巻JCの常任理事、花巻YEGの専務理事を務めるなど、地元のコミュニティや地域活性化活動にも取り組んでいる。

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

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

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

0120-501-764

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

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