跳到正文
原文
Reddit r/webdev· /u/sot-programmer·· 2026-10-10AI 评分39

我实测 Chrome 对 `@page { size: 80mm auto }` 的处理(无效),并做了个小票打印工具包

[Showoff Saturday] I measured what Chrome does with `@page { size: 80mm auto }` (nothing), then made a small receipt printing kit

AI 导读

一位 POS 软件开发者实测 Chrome 155 发现,`@page { size: 80mm auto }` 会被解析器直接丢弃,`getPropertyValue('size')` 返回空字符串,页面仍是 Letter;只有写成 `size: 80mm` 才得到 80×80mm 方形。

社媒成稿工作台 · 一键复制

飞书同步推送 · 含数据/日期/出处/启发
核心数据发布日期信源出处独立开发启发
1336
我实测 Chrome 对 `@page { size: 80mm auto }` 的处理(无效),并做了个小票打印工具包

📊 核心数据与事实(2026-10-10):
一位 POS 软件开发者实测 Chrome 155 发现,`@page { size: 80mm auto }` 会被解析器直接丢弃,`getPropertyValue('size')` 返回空字符串,页面仍是 Letter;只有写成 `size: 80mm` 才得到 80×80mm 方形。
• 原文实测切片:Chrome's parser drops the declaration, `getPropertyValue('size')` returns an empty string - `size: 80mm`: an 80 x 80 mm square - height measured in JS and written into the rule: exactly the receipt A 600-line receipt came out as 9 pages at `80m…
• 原文实测切片:Full write-up with the code (free, about 15 lines to do it yourself): I also packaged it with a stylesheet and 8 receipt templates for 80 mm and 58 mm rolls as a $9 kit, for anyone who doesn't want to redo it: Only tested in Chrome, plus one…

💡 对独立开发者的启发:
1/ 先看清流量背后的真实购买意图:主动搜索词往往处于成交临门一脚,泛对话流量更多停留在比价探索期。
2/ 独立开发算账永远看「单次访问净收入 × 实际 CPC」,别被单一渠道的表面曝光带偏,高意图长尾 SEO 与精准搜索词仍是基本盘。
3/ 想测试新流量渠道时,先拿极小预算跑通单页转化率(CVR)与回本周期,数据跑赢基准线再放大投入。

📅 日期:2026-10-10(北京时间)
📰 信息源出处:Reddit r/webdev · /u/sot-programmer(reddit.com)
🔗 原文:https://www.reddit.com/r/webdev/comments/1x2daxf/showoff_saturday_i_measured_what_chrome_does_with/
📡 归档:https://billionare.me/items/w3n5em1k3616oqi8asvygwjxn
去 X 发推
每天 08:00 邮件 / 08:30 飞书准点推送一手高信噪比情报与拆解免费订阅简报

来源:Reddit r/webdev · reddit.com