responsive-design by mindrally/skills
npx skills add https://github.com/mindrally/skills --skill responsive-design/* 移动设备基础样式 */
.container {
padding: 1rem;
}
/* 平板及以上设备 */
@media (min-width: 768px) {
.container {
padding: 2rem;
}
}
/* 桌面及以上设备 */
@media (min-width: 1024px) {
.container {
max-width: 1200px;
margin: 0 auto;
}
}
flex-wrap 实现响应式换行gap 实现一致的间距广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
auto-fit 和 auto-fill 实现响应式网格minmax() 实现灵活的轨道尺寸fr 单位与固定的最小值结合.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1rem;
}
container-type 定义容器clamp() 实现响应式字体大小h1 {
font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
}
rem 实现可缩放的排版rem 基准em 实现组件相对尺寸px 值srcset 提供多种图片分辨率sizes 指示在断点处的显示尺寸<img
src="image-800.jpg"
srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
sizes="(max-width: 600px) 100vw, (max-width: 1000px) 50vw, 800px"
alt="Description"
>
<img> 元素提供回退方案width 和 height 属性以防止布局偏移loading="lazy"aspect-ratio CSS 属性/* 小型手机 */
@media (min-width: 320px) { }
/* 大型手机 */
@media (min-width: 480px) { }
/* 平板 */
@media (min-width: 768px) { }
/* 笔记本电脑/台式机 */
@media (min-width: 1024px) { }
/* 大屏幕 */
@media (min-width: 1280px) { }
/* 超大屏幕 */
@media (min-width: 1536px) { }
@supports 进行特性检测prefers-color-scheme 用于暗色/亮色模式prefers-reduced-motion 用于动画偏好prefers-contrast 用于对比度偏好@media (hover: hover)<meta name="viewport" content="width=device-width, initial-scale=1">
user-scalable=no)每周安装量
91
仓库
GitHub 星标数
43
首次出现
2026年1月25日
安全审计
安装于
gemini-cli74
opencode74
claude-code72
cursor69
codex68
github-copilot67
Forces prioritization of essential content
Improves performance on mobile devices
Ensures core functionality works everywhere
Reduces CSS complexity and specificity issues
/* Base styles for mobile */ .container { padding: 1rem; }
/* Tablet and up */ @media (min-width: 768px) { .container { padding: 2rem; } }
/* Desktop and up */ @media (min-width: 1024px) { .container { max-width: 1200px; margin: 0 auto; } }
flex-wrap for responsive wrappinggap for consistent spacingUse for two-dimensional layouts
Leverage auto-fit and auto-fill for responsive grids
Use minmax() for flexible track sizing
Combine fr units with fixed minimums
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
container-typeUse clamp() for responsive font sizes
Set minimum, preferred, and maximum values
Avoid text that's too small on mobile or too large on desktop
h1 { font-size: clamp(1.5rem, 4vw + 1rem, 3rem); }
rem for scalable typographyrem on user's browser settingsem for component-relative sizingpx values for font sizesUse srcset for multiple image resolutions
Use sizes to indicate display size at breakpoints
Let browser choose optimal image
<img src="image-800.jpg" srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w" sizes="(max-width: 600px) 100vw, (max-width: 1000px) 50vw, 800px" alt="Description"
<img> elementwidth and height attributes to prevent layout shiftloading="lazy" for below-fold imagesaspect-ratio CSS property/* Small phones */
@media (min-width: 320px) { }
/* Large phones */
@media (min-width: 480px) { }
/* Tablets */
@media (min-width: 768px) { }
/* Laptops/Desktops */
@media (min-width: 1024px) { }
/* Large screens */
@media (min-width: 1280px) { }
/* Extra large screens */
@media (min-width: 1536px) { }
@supports for feature detectionprefers-color-scheme for dark/light modeprefers-reduced-motion for animation preferencesprefers-contrast for contrast preferences@media (hover: hover) for hover-capable devices<meta name="viewport" content="width=device-width, initial-scale=1">
user-scalable=no)Weekly Installs
91
Repository
GitHub Stars
43
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli74
opencode74
claude-code72
cursor69
codex68
github-copilot67
React视图过渡API使用指南:实现原生浏览器动画与状态管理
5,700 周安装
DigitalOcean计算服务指南:Droplets虚拟机、App Platform、Kubernetes、GPU与无服务器函数
114 周安装
Pencil 渲染器:将美学DNA代码转换为Pencil设计帧的MCP工具
111 周安装
uni-app 跨平台开发框架指南:Vue 语法一套代码编译 App/H5/小程序
116 周安装
Database Expert - Claude AI数据库专家技能,提升数据库开发与管理效率
70 周安装
Next.js 核心最佳实践指南:应用路由器、服务器组件与数据获取优化
115 周安装
Python货币转换器 - 支持150+货币汇率转换、批量处理与CSV格式化
111 周安装