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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Target IE6 and IE7 with only 1 extra character in your CSS

36 点作者 JournalistHack将近 16 年前

6 条评论

mcastner将近 16 年前
I've never been a big fan of these sort of hacks. Conditional comments work fine and I don't mind the extra request on the part of the users who choose to use an inferior browser. I'd rather have my IE users load more data than have everyone load more data.
voidpointer将近 16 年前
So now, if I understand this correctly, we get to mix all the special treatment for IE6 in one messy stylesheet instead of keeping them in a separate one where we can jut throw them out all at once when that thing has died off? I don't think so.
评论 #724881 未加载
eswat将近 16 年前
I don't validate my CSS and could care less if there were a hack or two in them. But I use conditional comments because I find it more easier to maintain and debug IE's garbage than using embedded hacks. If I wanted to save on HTTP requests, I'd look at other things that most users would be hitting (images, scripts) than one or two files that only some users with inferior browsers would hit.<p>If the everything-in-one-stylesheet route works for you and you know what you're getting into, power to you. But don't start asserting that those who use conditional comments are wasting their time and clients money solely for some CSS zen bullshit. That's just a silly accusation...
crcoffey将近 16 年前
When i look at conditional comments, I at least feel comfortable knowing that everything is plainly laid out, And looks cleanly formatted enough for me to be comfortable.<p>Slapping these one star hacks into my css everywhere would start to look very very messy.
jeroen将近 16 年前
Validating css (or html, rss for that matter) is a bit more than idealistic bullshit. It is testability and professionalism.
tvon将近 16 年前
Specifying per-browser CSS is hardly the problem.