惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
Blog — PlanetScale
Blog — PlanetScale
B
Blog
GbyAI
GbyAI
爱范儿
爱范儿
月光博客
月光博客
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
腾讯CDC
MyScale Blog
MyScale Blog
V
Visual Studio Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - Fernando

div 图片垂直居中问题 连续字符自动换行的解决方案 border: none 0 如何使用fiddler在firefox下通过2层代理调试网页 CSS hacks 【代码美化】CSS代码格式化和JS代码格式化工具 Fiddler的几个使用技巧 如何直接调试线上页面的JavaScript和CSS 敏捷软件开发模型--SCRUM 第一章:逻辑与证明 第九城市 Cognizant 高知特 上海瑞润电子科技有限公司 上海梵科信息科技有限公司 班库(上海)商务咨询有限公司 上海蓝矩信息科技有限公司 C# 中的委托和事件详解 关于Session_End()运行机制的一些细节! 无法打开 open a new function library
*:first-child+html CSS Hack
Fernando · 2009-03-15 · via 博客园 - Fernando

If the background color of this paragraph is green (a darker green than this page's background) then the hack was applied.

Example Code

p.test {
  background-color: #f66;
}

*:first-child+html p.test {
  background-color: #6f6;
}

List of browsers that apply this

  • IE7, when in Standards Compatibility mode

List of browsers that do not apply this

  • IE7, when in backwards compatibility mode (aka quirks mode)
  • IE4-6/Win
  • Firefox
  • NS6.0-7.2
  • NS4.x
  • Opera 5+
  • Safari
  • Konqueror 3
  • iCab 3
  • IE5.x/Mac

Note: IE5.5/Win and IE6/Win will ignore any rule that use this selector hack, even if there are multiple selector chains, each separated by a comma, and one of the others would normally apply to an element in the document. This is a very serious parser bug. This is demonstrated in the second test below.

If the background color of this paragraph is green then the hack works. If this is yellow then the browser supports the "* html" (star html) hack, but ignores the second rule.