ZOYKU火线榜

vladocar/hartija---css-print-framework技术文档

Universal CSS for web printing

目录大纲 (TOC) (2 章节)▾
多语言回退提示:当前仓库原作者暂未发布本地化文档,已为您无缝切换至官方英文原版(English),排版及代码实例完整保真。
极速安装
git clone https://github.com/vladocar/hartija---css-print-framework.git

Hartija---CSS-Print-Framework

What is Hartija?

Hartija is universal printing stylesheet or best printing CSS practices all in one.

How Hartija works?

Just use it like normal CSS:

<link rel="stylesheet" href="print.css" type="text/css" media="print">

The "magic" is in media="print", this CSS file will be used by the browser only when you print. You can also use it inside CSS like: @media print { .. }.

Only work you need to do is hide the stuff you don't need in the final print. Basically you hide some id and class in the CSS like:

#navbar, #footer, #someOtherID, .someClass, .otherClass { display : none; }

http://vladocar.github.io/Hartija---CSS-Print-Framework/

Demo Hartija

You can use direct download or:

$ npm i hartija---css-print-framework 
<link rel="stylesheet" href="https://unpkg.com/[email protected]/print.css" type="text/css" media="print" charset="utf-8">

License

This project is licensed under the MIT License

文档镜像归档自 GitHub 官方源路径 · 访问原项目 GitHub
最后同步快照:2026-11-08