Responsive Design

作者 wshobson46891e7e60da无许可证收录于 2026年10月8日更新于 2026年10月8日

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.

AI 生成的概览

指导使用容器查询、流体排版、CSS Grid 和断点策略实现响应式网页布局。

功能
该技能为构建自适应网页界面提供指导,涵盖移动优先断点策略、容器查询、流体排版与间距、CSS Grid 与 Flexbox 布局、响应式图片与媒体、自适应导航以及响应式表格。它列出最佳实践和常见问题,例如横向溢出、固定宽度、视口高度问题和触摸目标尺寸。详细的模式文档放在参考文件中,当概述不足时由智能体读取。
适用场景
适用于实现移动优先响应式布局、使用容器查询实现组件级响应、创建流体字号与间距体系,或为设计系统制定断点策略。也适用于响应式图片、自适应导航和响应式数据展示。
运行要求
无需脚本或特殊工具,仅包含说明和参考用 Markdown 文件。前提是智能体正在处理前端 CSS/HTML 布局代码。

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

来源与署名

来源:wshobson/agents位于plugins/ui-design/skills/responsive-design提交46891e7

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架