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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: What's your biggest gripe with CSS Media Queries?

3 点作者 obihill超过 8 年前
I&#x27;m currently finishing up with a complete re-write of a 2-year old JQuery plugin for Responsive Web Design (restive.js). It&#x27;s going to lose the JQuery dependency and have a couple more nice features for modern Web design.<p>I&#x27;ve never used CSS Media Queries to build Responsive websites, primarily because I found them quite frustrating when I started learning Responsive Web design.<p>Still, I know a lot of folks use CSS Media Queries and I&#x27;d like to find out what your biggest issue with it is?

3 条评论

dexwiz超过 8 年前
I don&#x27;t have a complaint, but I do have a piece of advice. Mobile-first design is real. Developers work largely on desktops, so they make the desktop version first. Then try to use media queries to apply mobile css using max-width. This seems sensible, but just does not seem to work out well. Instead do the unintuitive thing, design it for mobile first, and then scale up to tablet&#x2F;desktop using min-width to apply styles.<p>No matter your choice, go one way. try to avoid mixing min&#x2F;max-width and the cognitive load is way less.
评论 #12355861 未加载
LarryMade2超过 8 年前
Watch for iPhone retina and other hi-res devices that have resolution adjustments beyond the standard screen size.<p>Example query line<p><pre><code> @media only screen and (-webkit-min-device-pixel-ratio: 2) { ...</code></pre>
评论 #12382022 未加载
tmaly超过 8 年前
Not really a complaint, but knowing what the minimal set of screen sizes to use to be the most useful to the most number of devices.
评论 #12367828 未加载