推荐阅读

不同浏览器 Hack 的CSS定义

  CSS Hack是指我们为了兼容各浏览器,而使用的特别的css定义技巧。以下将最常用的几种方法记录如下:


第一种: 

#div { color: #333; } /* ff 识别*/ 
* html #div { color: #666; } /* IE6 识别*/ 
*+html #div { color: #999; } /* IE7识别 */
/*/ selector { color: #666; } /**/ /*  IE8 beta1 识别 */

第二种:

.div { 
  margin:10px;/*ff识别*/ 
  *margin:15px;/*ie7识别*/ 
  _margin:15px;/*ie6识别*/ 


第三种: 

.div { 
  background:orange;/*ff识别*/ 
  *background:green !important;/*ie7识别*/ 
  *background:blue; /*ie6识别*/ 

  *background:blue; /*ie识别*/ 

  background/**/:blue; /*ie5识别*/ 

  以下是一个CSS Hack列表,显示了各浏览器对css hack的支持程度,对我们制作兼容网页非常有帮助。

作者:yahu 发布时间:2008年09月21日 点击数: 收藏 打印文章
ed hardy nfl jerseys replica handbags christian louboutin louboutin
网站地图  |  关于站长  |  友情链接  |  版权声明top