旋转木马
- 作者仓库星标 574
- 作者仓库 marketing-skills
- 领域
- 安全
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @kostja94 · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Components: Carousel Layout
Guides carousel (slider) layout design for sequential content display. Carousels show one or few items at a time; users swipe or click to advance. Best when space is limited and multiple items need rotation—testimonials, quotes, logos, gallery highlights.
**When invoking**: On **first use**, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On **subsequent use** or when the user asks to skip, go directly to the main output.
## When to Use Carousel
| Use carousel when | Use grid/list when |
|-------------------|---------------------|
| **Limited space** | Full catalog visible |
| One focus at a time; rotation desired | Browse, compare many items |
| Testimonials, quotes, logos, featured gallery | Products, templates, blog index |
| Above fold; hero or section highlight | Full listing; discovery |
See **grid** for equal-hierarchy display; **list** for text-heavy scan; **masonry** for varying-height gallery.
## Carousel vs Grid vs List vs Masonry
| Layout | Structure | Best for |
|--------|-----------|----------|
| **Grid** | Equal rows and columns; all visible | Products, templates, features |
| **List** | Single column; stacked | Blog index, docs, search results |
| **Masonry** | Columns; varying heights | Pinterest-style gallery |
| **Carousel** | Slides; one/few visible; swipe/click | Testimonials, logos, featured items |
## Best Practices
### Accessibility
- **Keyboard navigation**: Arrow keys to move; Enter/Space to activate; focus visible
- **User control**: Don't auto-advance too fast; allow pause; avoid auto-advance if `prefers-reduced-motion` is set
- **Announcements**: Screen reader users need to know current slide and total (e.g., "Slide 2 of 5")
- **Touch targets**: ≥44×44px for prev/next buttons on mobile
### Performance
- **Lazy load**: Load off-screen slides on demand; avoid loading all images upfront
- **Reserve space**: Reserve space for slides to avoid layout shift (CLS)
### SEO
- **Content in DOM**: All carousel content must be in the initial HTML at page load. Google does not simulate clicks; content loaded via AJAX on slide change is not discoverable. Same as **tab-accordion**.
- **Recommendation**: Server-render all slides in HTML; use CSS/JS only to show/hide. See **rendering-strategies**.
## Use Cases
| Use case | Format | Page Skill |
|----------|--------|------------|
| **Testimonials** | Quote carousel; multiple testimonials | **testimonials-generator** |
| **Showcase / Gallery** | Featured items; rotation | **showcase-page-generator** |
| **Press logos** | "As Seen In" logo strip or quote carousel | **press-coverage-page-generator** |
| **Community** | Banner carousel below hero | **community-forum** |
## Related Skills
- **grid**: Grid for full catalog; when carousel is too restrictive
- **list**: List for text-heavy scan
- **masonry**: Masonry for varying-height gallery
- **card**: Card structure within carousel slides
- **testimonials-generator**: Testimonial carousel; testimonials as content
- **showcase-page-generator**: Gallery format options (grid, masonry, carousel)
- **tab-accordion**: Similar SEO requirement—content in DOM at load
- **rendering-strategies**: SSR, SSG; content in initial HTML for crawlers
章节与文件索引
按说明文件中的顺序排列。
何时使用轮播
旋转木马、网格、列表、砖石
无障碍
性能
搜索引擎优化
文件/命令 -> prefers-reduced-motion · grid/list · one/few · swipe/click · Enter/Space · prev/next · CSS/JS · show/hide.
内容校验值 -> 026080caf69d
当前原文的自动摘译,尚未人工审校。
何时使用轮播
何时使用轮播 · 空间有限时使用网格/列表 · 完整目录可见 一次一个焦点;所需轮换 · 浏览、比较许多项目 感言、引言、徽标、特色图库 · 产品、模板、博客索引 首屏;英雄或章节亮点 · 完整列表;发现
旋转木马、网格、列表、砖石
布局·结构·最适合网格·行列相等;所有可见 · 产品、模板、功能列表 · 单栏;堆叠·博客索引、文档、搜索结果砌体·专栏;不同高度 · Pinterest 风格的画廊轮播 · 幻灯片;一个/几个可见;滑动/点击 · 推荐、徽标、特色项目
无障碍
键盘导航:方向键移动;输入/空格激活;焦点可见 用户控制:不要自动前进太快;允许暂停;如果设置了
prefers-reduced-motion,则避免自动前进 公告:屏幕阅读器用户需要了解当前幻灯片和总数(例如,“幻灯片 2,共 5 张”) 触摸目标:移动设备上的上一张/下一张按钮≥44×44px性能
延迟加载:按需加载离屏幻灯片;避免预先加载所有图像保留空间:为幻灯片保留空间以避免布局变化(CLS)
搜索引擎优化
DOM 中的内容:所有轮播内容必须位于页面加载时的初始 HTML 中。 Google 不会模拟点击;无法发现在幻灯片更改时通过 AJAX 加载的内容。与制表符手风琴相同。建议:服务器以 HTML 格式呈现所有幻灯片;仅使用 CSS/JS 来显示/隐藏。请参阅渲染策略。