Responsive Web Design

aj-geddes/useful-ai-prompts/skills/responsive-web-design

作者 aj-geddes3f5182cfd739无许可证355 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7个月前更新

Create responsive layouts using CSS Grid, Flexbox, media queries, and mobile-first design. Use when building adaptive interfaces that work across all devices.

AI 生成的概览

指导使用 CSS Grid、Flexbox、媒体查询和排版构建移动优先的响应式网页布局。

功能
提供参考指南和组件模板,用于创建响应式网页界面。内容涵盖移动优先媒体查询策略、Flexbox 导航、CSS Grid 布局、响应式排版和卡片组件。材料以教学为主,包含 CSS 示例和一个 TSX 组件模板。
适用场景
适用于构建需要跨设备运行的适配界面,包括多设备应用、移动优先开发、无障碍布局和灵活 UI 系统。
运行要求
无脚本或运行时依赖;附带参考 Markdown 文件和一个 TSX 组件模板。

Responsive Web Design

Table of Contents

Overview

Build mobile-first responsive interfaces using modern CSS techniques including Flexbox, Grid, and media queries to create adaptable user experiences.

When to Use

  • Multi-device applications
  • Mobile-first development
  • Accessible layouts
  • Flexible UI systems
  • Cross-browser compatibility

Quick Start

Minimal working example:

css
/* Mobile styles (default) */.container {  display: flex;  flex-direction: column;  padding: 16px;  gap: 16px;}
.card {  padding: 16px;  border-radius: 8px;  background: white;  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);}
.grid {  display: grid;  grid-template-columns: 1fr;  gap: 16px;}
/* Tablet (640px and up) */@media (min-width: 640px) {  .container {    flex-direction: row;// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Mobile-First Media Query Strategy [blocked]Mobile-First Media Query Strategy
Flexbox Responsive Navigation [blocked]Flexbox Responsive Navigation
CSS Grid Responsive Layout [blocked]CSS Grid Responsive Layout
Responsive Typography [blocked]Responsive Typography
Responsive Cards Component [blocked]Responsive Cards Component

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

来源与署名

来源:aj-geddes/useful-ai-prompts位于skills/responsive-web-design提交3f5182c

许可证: 无许可证

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

举报或申请下架