CSS属性旁边的星号是什么意思? [英] What does an asterisk mean next to a CSS property?

查看:288
本文介绍了CSS属性旁边的星号是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

星号在CSS属性名称中做什么?

我想弄明白这个CSS文件中vertical-align:middle属性旁边的星号(*)是什么意思:

I am trying to figure out what the asterisk (*) means next to the "vertical-align: middle" property in this CSS file:

button, input, select, textarea { 
  font-family: sans-serif; 
  font-size: 100%; 
  margin: 0; 
  vertical-align: baseline; 
  *vertical-align: middle; 
}

此外,为什么会将vertical-align重复两次,值不同于第一个?

Also, why would "vertical-align" be repeated twice, with the asterisk value different than the first?

我知道类名称旁边的意思,但是我从来没有见过它的属性。

I know what it means next to the class name, but I've never seen it next to a property.

推荐答案

这是一个CSS黑客。只有IE7及以下会识别它。

It's a CSS hack. Only IE7 and below will recognize it.

我不建议使用它。相反,使用IE条件注释为BODY标记呈现不同的类名称,具体取决于所使用的IE的版本。

I wouldn't recommend using it. Instead, use IE conditional comments to render a different class name for the BODY tag depending on the version of IE being used.

当我要处理旧版本的IE时,我使用类似以下的方法:

When I have to deal with old versions of IE, I use a method similar to this:

a href =http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/> http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/

http://nicolasgallagher.com/better-conditional-classnames-for-hack-free-css/

这篇关于CSS属性旁边的星号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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