Loading...
Loading...
Compare original and translation side by side
.claude/project-context.md.cursor/project-context.md.claude/project-context.md.cursor/project-context.md| Requirement | Action |
|---|---|
| Content parity | Mobile version must include same primary content as desktop; avoid hiding key content on mobile |
| Structured data | Same schema on mobile and desktop; ensure mobile URLs in schema |
| Metadata | Same title, meta description on mobile |
| Media | Images should be crawlable; avoid lazy-loading above-fold images |
| 要求 | 操作 |
|---|---|
| 内容一致性 | 移动端版本必须包含与桌面端相同的核心内容,避免在移动端隐藏关键内容 |
| 结构化数据 | 移动端和桌面端使用相同的schema,确保schema中使用移动端URL |
| 元数据 | 移动端使用相同的标题、meta描述 |
| 媒体资源 | 图片应当可被抓取,避免对首屏图片使用懒加载 |
| Principle | Practice |
|---|---|
| Mobile-first | Design for mobile first; enhance for desktop |
| Fluid layout | Use |
| Breakpoints | Common: 320px, 768px, 1024px, 1280px; match device widths |
| Images | Responsive images ( |
| 原则 | 实践 |
|---|---|
| 移动端优先 | 优先为移动端设计,再针对桌面端增强功能 |
| 流式布局 | 使用 |
| 断点设置 | 常用断点:320px、768px、1024px、1280px,匹配设备宽度 |
| 图片处理 | 响应式图片( |
<meta name="viewport" content="width=device-width, initial-scale=1">| Attribute | Purpose |
|---|---|
| Match viewport to device screen width |
| 1:1 scale on load; prevents zoom |
| Avoid disabling zoom (accessibility) |
| Avoid—hurts accessibility |
<meta name="viewport" content="width=device-width, initial-scale=1">| 属性 | 作用 |
|---|---|
| 将viewport宽度匹配设备屏幕宽度 |
| 页面加载时按1:1比例缩放,避免自动缩放 |
| 不要禁用缩放功能(影响可访问性) |
| 禁止使用——会损害可访问性 |
| Element | Guideline |
|---|---|
| Viewport | See above; required for mobile-friendly |
| Font size | 16px minimum for body text; avoid zooming to read |
| Touch targets | Buttons/links ≥48×48px; adequate spacing between taps |
| Content width | No horizontal scrolling; content fits viewport |
| Intrusive interstitials | Avoid popups that block main content on mobile |
| 元素 | 规范 |
|---|---|
| Viewport | 参考上文配置,是移动端友好的必备条件 |
| 字体大小 | 正文最小字号16px,避免用户需要缩放才能阅读 |
| 触控目标 | 按钮/链接尺寸≥48×48px,点击区域之间保留足够间距 |
| 内容宽度 | 无横向滚动条,内容完全适配viewport宽度 |
| 侵入式插屏广告 | 避免在移动端使用会遮挡核心内容的弹窗 |
| Issue | Fix |
|---|---|
| Content hidden on mobile | Show critical content; avoid accordion/tabs for primary content |
| Flash / unsupported | Replace with HTML5 alternatives |
| Text too small | Use base font ≥16px; avoid |
| Links too close | Increase tap target size; add padding |
| 问题 | 修复方案 |
|---|---|
| 移动端内容被隐藏 | 展示核心内容,避免对主要内容使用折叠/标签页隐藏 |
| Flash / 不支持的内容 | 使用HTML5替代方案替换 |
| 文本字号过小 | 基础字号≥16px,避免使用小于12px的 |
| 链接间距过近 | 增大点击目标尺寸,添加内边距 |
| Approach | When | Note |
|---|---|---|
| Responsive | Preferred | Single URL; same HTML, CSS media queries |
| Dynamic serving | Same URL, different HTML by user-agent | Ensure mobile content parity |
| Separate URLs | m.example.com | Use canonical + hreflang; see canonical-tag, page-metadata |
| 方案 | 适用场景 | 注意事项 |
|---|---|---|
| 响应式 | 首选方案 | 单个URL,相同HTML,通过CSS媒体查询适配 |
| 动态提供内容 | 相同URL,根据user-agent返回不同HTML | 确保移动端内容与桌面端一致 |
| 独立移动端URL | 如m.example.com | 使用canonical + hreflang配置,参考canonical-tag、page-metadata |
| Aspect | Note |
|---|---|
| Ranking | No ranking advantage over well-optimized responsive pages |
| Top Stories | AMP no longer required since 2021; Core Web Vitals suffice |
| When to consider | News sites, ad-heavy pages, very slow hosting—but responsive + CWV usually better |
| Alternative | Responsive design + core-web-vitals optimization; SSR/SSG; see rendering-strategies |
| 维度 | 说明 |
|---|---|
| 排名 | 相比优化良好的响应式页面没有额外排名优势 |
| 头条新闻轮播 | 2021年起不再要求必须使用AMP,满足Core Web Vitals即可 |
| 适用场景 | 新闻站点、广告密集页面、主机速度极慢的站点——但通常响应式设计 + CWV优化是更好的选择 |
| 替代方案 | 响应式设计 + core-web-vitals优化;SSR/SSG,参考rendering-strategies |