引用
现在我大部分都是用!important来hack,对于ie6和firefox测试可以正常显示,但是ie7对!important可以正确解释,会导致页面没按要求显示!搜索了一下,找到一个针对IE7不错的hack方式就是使用“*+html”,现在用IE7浏览一下,应该没有问题了。
现在写一个CSS可以这样:
那么在firefox下字体颜色显示为#333,IE6下字体颜色显示为#666,IE7下字体颜色显示为#999,他们都互不干扰。
现在写一个CSS可以这样:
#example { color: #333; } /* Moz */
* html #example { color: #666; } /* IE6 */
*+html #example { color: #999; } /* IE7 */
* html #example { color: #666; } /* IE6 */
*+html #example { color: #999; } /* IE7 */
那么在firefox下字体颜色显示为#333,IE6下字体颜色显示为#666,IE7下字体颜色显示为#999,他们都互不干扰。
This entry comes from 本站原创 and has been read for 5097 times.
烟雨江南
says:
says:
at October 23, 2006 19:54
请教一下,这三行代码具体应该怎么添加?是添加到elements还是styles里?我放在elements的头三行,结果虽然实现了兼容的功能,但是网页上方也会显示出这些代码。
什么代码?有没有具体演示?
pfire 回复于 October 23, 2006 22:12
幻轩
says:
says:
at October 17, 2006 13:49
找到好东西了~
作风格要考虑的越来越多了
pfire 回复于 October 19, 2006 16:57
分页: 1/1
1
1


