响应式设计
- 作者仓库星标 36,312
- 作者仓库 agents
- 领域
- 设计与多媒体
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @wshobson · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# 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
章节与文件索引
按说明文件中的顺序排列。
何时使用此技能
详细的模式和工作示例
最佳实践
常见问题
文件/命令 -> references/details.md · inline/block
内容校验值 -> 42aef05cea2a
当前原文的自动摘译,尚未人工审校。
何时使用此技能
实现移动优先的响应式布局 使用容器查询实现基于组件的响应性 创建流畅的版式和间距比例 使用 CSS Grid 和 Flexbox 构建复杂的布局 为设计系统设计断点策略
详细的模式和工作示例
详细的模式文档位于
references/details.md。当上面的导航层不够时,请阅读该文件。最佳实践
移动优先:从移动样式开始,针对更大的屏幕进行增强内容断点:根据内容设置断点,而不是设备流动固定:使用流体值进行排版和间距容器查询:用于组件级响应测试真实设备:模拟器无法捕获所有问题
常见问题
水平溢出:内容超出视口固定宽度:使用 px 而不是相对单位视口高度:移动浏览器上的 100vh 问题字体大小:移动设备上的文本太小触摸目标:按钮太小而无法准确点击