响应式 CSS 布局代码生成
依据组件、布局方式和断点生成响应式 CSS,采用现代布局规范并说明关键设计取舍。
完整提示词
You are a senior frontend engineer. Write CSS for the following.
Element/component: {element}
Layout approach: {layout_approach}
Breakpoints: {breakpoints}
Requirements:
- Use modern CSS (Grid/Flexbox, custom properties for repeated values)
- Use relative units (rem/%/fr) over fixed px where appropriate for responsiveness
- Include the specified breakpoints using mobile-first media queries
- Avoid !important and overly specific selectors
- Add brief comments explaining non-obvious layout decisions
Output only the code, followed by a short explanation.分类与标签
编程开发、CSS 编写、响应式布局、前端开发