TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

CSS px is an Angular Measurement

129 点作者 ned大约 13 年前

8 条评论

gwillen大约 13 年前
This is dumb. The fact that one pixel subtends a particular visual angle does not imply that N pixels subtend N times that angle. It should be very plain to anybody implementing or using a rendering engine that pixels are intended to be linearly additive. This implies that N pixels will subtend less than N times the angle one pixel subtends. On a flat screen, this is normal and expected, because a pixel further from the eye will subtend less angle than a pixel closer to the eye.
评论 #3696246 未加载
评论 #3696424 未加载
评论 #3695594 未加载
评论 #3696280 未加载
评论 #3696476 未加载
javajosh大约 13 年前
This is one of the more important Hacker News submissions I've seen in a long time. It seems that there is, potentially, a fundamental disconnect between what "px" is <i>supposed</i> to mean and what it means <i>in practice</i>. Given the incredible importance of the web, particularly the front-end of the web, and the extraordinary increases in screen resolution (today the iPhone 4 and iPad 3, tomorrow most computers), it's very important to resolve this discrepancy.<p>Personally, I'm disgusted at the W3C standard. It's a great idea to have an angular measure (really great) but to call it a "pixel" is horrible. A pixel is the smallest controllable dot on a physical display, and nothing else. Call it an "aixle" abbreviated "ax" and short for "angular pixel" but don't overload the term "pixel".
评论 #3695689 未加载
评论 #3697227 未加载
评论 #3696182 未加载
colanderman大约 13 年前
Interesting. The angular resolution of the human eye is about 0.02° according to Wikipedia (<a href="http://en.wikipedia.org/wiki/Naked_eye#Basic_accuracies" rel="nofollow">http://en.wikipedia.org/wiki/Naked_eye#Basic_accuracies</a>), which, using the provided calculator on this page, corresponds very nearly to one pixel (0.938 to be exact). Pretty sweet.
yonran大约 13 年前
Not only is the definition of pixel unexpected, but 1in is now defined to be 96px in CSS 2.1, because this was the default in Windows for so many years. In retrospect, given whole page zoom from Opera and high-resolution displays from Apple, probably CSS shouldn't have had units named "in" and "px" at all but instead should have had a single unit like SVG.
nthitz大约 13 年前
Ok, but does it matter?
评论 #3695282 未加载
评论 #3695165 未加载
评论 #3695166 未加载
kickingvegas大约 13 年前
I've mentioned this before and I'm not the first to say it, but it's time to stop using px and start using in its place absolute measurements like inches or millimeters. It's the only sane approach to supporting different resolution displays.
评论 #3697244 未加载
评论 #3696314 未加载
tantalor大约 13 年前
Example Moon in px: <a href="https://gist.github.com/2025080" rel="nofollow">https://gist.github.com/2025080</a>
evincarofautumn大约 13 年前
This matters more still for a display with head-tracking. As I read this, the apparent angular size of 1px within a human’s FOV ought to remain constant, regardless of viewer position or physical pixels.