*在CSS中做什么? [英] What does the * do in CSS?

查看:143
本文介绍了*在CSS中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

明星做什么?这叫什么?对我来说,这是一种通配符。它叫什么,所以我可以读一下吗?

What does the star do? What is it called? For me it is some kind of wild card. What is it called so I can read about it?

#div {
  *zoom: 1; /*this ... *
   zoom : 1;
   display: inline;
   *display: inline; /*... and this, whats the difference? *
}



我知道这是什么意思(所有元素):

I know what this means (all elements):

* {
..css code
}


推荐答案

简单来说,它的目标css的关键在不同的IE浏览器版本。它也可以被称为CSS Hack。

In simple words, its the key to target css on different IE browser versions. It can also be called as an CSS Hack.

#div {
  *zoom: 1; /*Only works on IE7 and below*/
  zoom : 1;
  display: inline;
  *display: inline; /*Only works on IE7 and below*/
}

IE7及以下。

这里是如何指定IE6,IE7和IE8唯一

Here is how to target IE6, IE7, and IE8 Uniquely

#div{  
 color: red; /* all browsers, of course */  
 color : green\9; /* IE8 and below */  
 *color : yellow; /* IE7 and below */  
 _color : orange; /* IE6 */  
} 

如果您想详细了解浏览器特定的CSS,请点击这里

这篇关于*在CSS中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆