案例作品集 浏览精选项目

WESWOO 提供 Shopify Plus 项目开发费抵扣,至多 US$4,800

搜索
图库与细节展示

图片卡片揭示说明

点开一张人物卡读完说明,再收起换到下一张。键盘用户和触屏用户也要能看到同样的图注,不能把关键说明只放在悬停瞬间。

在手机直接点人物图注,再用键盘切到另一张。检查说明文字和目的地都来自最后选中的卡片,且关掉动效后不需要悬停才能读说明。

默认模式下说明可展开再收起;减少动态效果时它从一开始就展开,两次点选都能继续阅读。

复现实验与读数

对第一张照片连续点选两次,读取其说明是否展开。

908、316 px,默认动态
否,再到 是,再到 否
908、316 px,减少动态效果
是,再到 是,再到 是

WESWOO 在独立 Chrome 窗口载入本页公开示例的 HTML、CSS 和 JavaScript,预览高 700 px。两种宽度下都单独测试默认偏好和减少动态效果。

2026-11-24 · Chrome 157.0.8103.79

下载测试条件与原始读数(JSON)

正在准备预览

特效说明

先确定读者要查看什么

先看摄影画面,再点按或悬停显示简短说明。

让图片和交互保持清楚

为图片保留清晰替代文本和明确来源。接入主题时替换成商家有权使用的素材,并检查手机操作、动效偏好和页面滚动。

示例源码

查看 3 个源文件HTML · CSS · MJS
lookbook-reveal.html
<section class="fx lookbook-demo" data-effect="lookbook-reveal"><header class="lb-header"><p class="lb-eyebrow">WESWOO / Visual showcase</p><h2>Real photography.<br>A story worth exploring.</h2><p class="lb-intro">Explore materials, settings and visual storytelling through three portrait photographs. Hover or tap to reveal the description; tap again or press Escape to close. This is a visual interaction demo.</p></header><section class="lb-grid" aria-label="Portrait photography"><button type="button" class="lb-card" aria-expanded="false" aria-controls="lb-detail-1"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22480%22%20height%3D%22640%22%20viewBox%3D%220%200%20480%20640%22%3E%3Crect%20width%3D%22480%22%20height%3D%22640%22%20fill%3D%22%23e8ece6%22%2F%3E%3Ctext%20x%3D%22240%22%20y%3D%22300%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2221%22%20fill%3D%22%2340564b%22%3EReplace%20image%201%3C%2Ftext%3E%3Ctext%20x%3D%22240%22%20y%3D%22338%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2215%22%20fill%3D%22%2340564b%22%3EUse%20your%20own%20licensed%20photograph%3C%2Ftext%3E%3C%2Fsvg%3E" alt="A portrait in warm light"><span class="lb-photo-label">01 / Portrait</span><span class="lb-caption" id="lb-detail-1"><span class="lb-index">PORTRAIT 01</span><strong>A portrait in warm light</strong><p>Warm light and posture shape the composition.</p><span class="lb-action">Tap to close · Interaction demo</span></span></button><button type="button" class="lb-card" aria-expanded="false" aria-controls="lb-detail-2"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22480%22%20height%3D%22640%22%20viewBox%3D%220%200%20480%20640%22%3E%3Crect%20width%3D%22480%22%20height%3D%22640%22%20fill%3D%22%23e8ece6%22%2F%3E%3Ctext%20x%3D%22240%22%20y%3D%22300%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2221%22%20fill%3D%22%2340564b%22%3EReplace%20image%202%3C%2Ftext%3E%3Ctext%20x%3D%22240%22%20y%3D%22338%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2215%22%20fill%3D%22%2340564b%22%3EUse%20your%20own%20licensed%20photograph%3C%2Ftext%3E%3C%2Fsvg%3E" alt="A street fashion portrait against blue architecture"><span class="lb-photo-label">02 / Street style</span><span class="lb-caption" id="lb-detail-2"><span class="lb-index">STREET 02</span><strong>Street style in blue</strong><p>A portrait and blue architecture create a strong colour contrast.</p><span class="lb-action">Tap to close · Interaction demo</span></span></button><button type="button" class="lb-card" aria-expanded="false" aria-controls="lb-detail-3"><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22480%22%20height%3D%22640%22%20viewBox%3D%220%200%20480%20640%22%3E%3Crect%20width%3D%22480%22%20height%3D%22640%22%20fill%3D%22%23e8ece6%22%2F%3E%3Ctext%20x%3D%22240%22%20y%3D%22300%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2221%22%20fill%3D%22%2340564b%22%3EReplace%20image%203%3C%2Ftext%3E%3Ctext%20x%3D%22240%22%20y%3D%22338%22%20text-anchor%3D%22middle%22%20font-family%3D%22sans-serif%22%20font-size%3D%2215%22%20fill%3D%22%2340564b%22%3EUse%20your%20own%20licensed%20photograph%3C%2Ftext%3E%3C%2Fsvg%3E" alt="A studio portrait against a dark background"><span class="lb-photo-label">03 / Studio portrait</span><span class="lb-caption" id="lb-detail-3"><span class="lb-index">STUDIO 03</span><strong>A quiet studio portrait</strong><p>A dark backdrop keeps the focus on the portrait.</p><span class="lb-action">Tap to close · Interaction demo</span></span></button></section><div class="lb-dots" aria-label="Gallery pages"><button type="button" data-lb-dot aria-label="1" aria-pressed="true"></button><button type="button" data-lb-dot aria-label="2" aria-pressed="false"></button><button type="button" data-lb-dot aria-label="3" aria-pressed="false"></button></div></section>

接入与验收

接入主题

3 步
  1. 复制要接入的主题

    在主题副本里接入和预览示例。

  2. 把素材接到区块设置

    将示例文字与图片替换为 Section 设置,并把样式限定在当前 Section。

  3. 绑定编辑器生命周期

    用生命周期脚本处理主题编辑器重载、离屏暂停和卸载清理。

使用位置

  • 摄影、Lookbook 或系列介绍;示例摄影来自 Codrops ColumnScroll 所注明的 Unsplash 素材。

交互逻辑

  • 鼠标、键盘和触屏使用同一状态;在线示例展示人物摄影。

触摸与无障碍

  • 减少动态时直接显示结果;移动端保留可点击控制与正常页面滚动。

本效果的接入说明

示例图片用于项目展示;接入主题时请选择有权使用的图片,并按主题实际结构测试。

上线检查

接入文件
sections/ww-effect.liquid
{% comment %} WESWOO example shell. Add ONE effect's HTML inside .fx-slot. {% endcomment %}
{{ 'ww-effects.css' | asset_url | stylesheet_tag }}
<section id="ww-effect-{{ section.id }}" data-ww-effect-section>
  <h2>{{ section.settings.heading | escape }}</h2>
  <button type="button" data-effect-toggle aria-pressed="false">Play / pause effect</button>
  <div class="fx-slot">
    {% comment %} Insert the chosen .fx element here; read copy/images from section settings. {% endcomment %}
  </div>
</section>
<script type="module" src="{{ 'ww-effect-section.js' | asset_url }}"></script>
{% schema %}
{"name":"WESWOO effect","settings":[{"type":"text","id":"heading","label":"Heading","default":"Our story"}],"presets":[{"name":"WESWOO effect"}]}
{% endschema %}

通用壳层需要填入所选效果。每个模块接入一种效果;多种效果需建立明确的注册与 Section 对应关系。

参考资料

示例范围与许可

示例由 WESWOO 和注明的开源作者提供,复制代码时请保留相应许可。在线项目画面与摄影的权利归原权利人;下载文件使用占位图片,接入时请替换为有权使用的素材。

Shopify/dawn · modal / slider base classesShopify/dawn · product media galleryShopify/dawn · license

资料核对 · 2026-11-24