跳到正文
Skillpedia
界面(UI/UX)41k · #6807

responsive-design

它能做什么

这个技能可以帮你打造能自动适应各种屏幕尺寸的网站和应用,无论是手机、平板还是电脑。它能确保内容在任何设备上都显示良好、操作顺畅。

适用场景

  • ✓当你要做一个在手机和电脑上都要表现良好的网站时。
  • ✓当你希望网站的某些部分能够独立调整自身布局时。
  • ✓当你希望文字和间距在所有屏幕尺寸上都保持合理的比例时。

技能链接

https://github.com/wshobson/agents/blob/main/plugins/ui-design/skills/responsive-design/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/wshobson/agents/blob/main/plugins/ui-design/skills/responsive-design/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该怎么让网站适应不同的屏幕尺寸?”

每周 5 个新技能,1 分钟读完。

工作原理

它采用现代技术,让视觉元素能根据可用空间重新排列和调整大小。它先从移动端出发进行思考,再逐步适配更大的屏幕,确保在各处都有良好的体验。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Responsive Design

Master modern responsive design techniques to create interfaces that adapt seamlessly across all screen sizes and device contexts.

When to Use This Skill

  • Implementing mobile-first responsive layouts
  • Using container queries for component-based responsiveness
  • Creating fluid typography and spacing scales
  • Building complex layouts with CSS Grid and Flexbox
  • Designing breakpoint strategies for design systems
  • Implementing responsive images and media
  • Creating adaptive navigation patterns
  • Building responsive tables and data displays

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Mobile-First: Start with mobile styles, enhance for larger screens
  2. Content Breakpoints: Set breakpoints based on content, not devices
  3. Fluid Over Fixed: Use fluid values for typography and spacing
  4. Container Queries: Use for component-level responsiveness
  5. Test Real Devices: Simulators don't catch all issues
  6. Performance: Optimize images, lazy load off-screen content
  7. Touch Targets: Maintain 44x44px minimum on mobile
  8. Logical Properties: Use inline/block for internationalization

Common Issues

  • Horizontal Overflow: Content breaking out of viewport
  • Fixed Widths: Using px instead of relative units
  • Viewport Height: 100vh issues on mobile browsers
  • Font Size: Text too small on mobile
  • Touch Targets: Buttons too small to tap accurately
  • Aspect Ratio: Images squishing or stretching
  • Z-Index Stacking: Overlays breaking on different screens
常见问题

“移动优先”是什么意思?

指设计时先考虑在手机最小屏幕上的效果,再为较大的屏幕逐步增加优化。

什么是“容器查询”?

它是一种规则,让组件(页面中的一部分)根据所在空间的大小来调整自身,而不是根据整个屏幕的尺寸来调整。

为什么一定要在真实设备上测试?

模拟器可能无法暴露所有问题。在真实的手机和平板上测试,才能确保网站对所有用户都表现完美。

详情

作者的原始描述

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

repo: wshobson/agents

热度

GitHub 星标
41k
排名
#6807
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能