为什么要声明两次相同的CSS参数,而第二次声明带有星号? [英] Why declare the same CSS parameter twice, but second one with a asterisk?

查看:151
本文介绍了为什么要声明两次相同的CSS参数,而第二次声明带有星号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
CSS重置-样式中asterik的用途

Possible Duplicate:
CSS reset - purpose of asterik within a style

我正在阅读HTML5BoilerPlate的CSS样式,但遇到了这一陌生的地方:

I was reading through the CSS styles for HTML5BoilerPlate, and I came across this unfamiliar line:

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

尤其是第二个**** vertical-align ***,为什么要打两次并在其前面加一个星号.

In particular, the second ****vertical-align***, why call twice and put an asterisk in front of it.

如果有人知道该技术的名称或使用原因,那将是一个很大的帮助

If anyone knows the name of the technique or why it's used, it would be a great help

谢谢!

-阿德里安

推荐答案

这是讨厌的黑客可用于定位IE的较早版本(其他浏览器将忽略无效的带星号前缀的值).绝对不是一个好主意,使用IE条件样式表或类似技术要好得多.

It's a nasty hack that can be used to target older versions of IE (other browsers ignore the invalid asterisk-prefixed value). Definitely not a good idea, far better to use IE conditional stylesheets or similar techniques.

这篇关于为什么要声明两次相同的CSS参数,而第二次声明带有星号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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