跳到正文
Skillpedia
网站与界面(前端)75k · #2803

css-print

它能做什么

这项技能帮助为网页样式创建打印版本。适合希望打印页面整洁、易读的开发者。

适用场景

  • ✓当访客经常打印你的文章、指南或收据时。
  • ✓当打印页面上出现了纸质版上没有用的菜单、广告或按钮时。
  • ✓当你希望打印页面上的文字易于阅读时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-print/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/css-print/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“当有人打印我的网页时,你能让它看起来整洁一些吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会添加专门针对打印的规则,隐藏纸质版上不需要的内容,并调整字体和间距。它还会让有用的链接在打印版中保持可读。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Include a print stylesheet

Print stylesheets ensure content is readable when printed—removing digital clutter and optimizing for paper saves ink and improves accessibility.

Quick Reference

  • Use @media print for print-specific styles
  • Hide navigation, ads, and interactive elements with .no-print
  • Use serif fonts at 12pt and optimize page breaks
  • Show full URLs for external links in printed output

Check

Verify that a print stylesheet is provided and properly optimized for printed pages with appropriate typography, layout, and hidden elements.

Fix

Create a print stylesheet that removes unnecessary elements, optimizes typography for print, and ensures content is readable when printed.

Explain

Explain how print stylesheets improve user experience for printed pages by optimizing layout, removing digital-only elements, and ensuring readability.

Code Review

Review stylesheets, component styles, and responsive states related to Include a print stylesheet. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/css-print

常见问题

打印网页时哪些内容会被隐藏?

导航菜单、广告和按钮等内容可以被隐藏。具体列表取决于你的页面。

我需要单独的打印页面吗?

不需要。打印规则位于同一个样式表中,只在打印时生效。

纸质版上会显示网址吗?

这项技能建议在打印输出中显示外部引用的完整链接,方便读者以后查找。

详情

作者的原始描述

Use when reviewing stylesheets, component styles, and responsive behavior related to Include a print stylesheet. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2803
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能