Home >Web Front-end >CSS Tutorial >Browser CSS Hack Collection
所谓的Hack就是只有特定浏览器才能识别这段hack代码。Hack 不是什么好东西,除非没有办法,我们尽量还是不要用着玩意。 下面是各个浏览器的CSS Hack 列表。
@-moz-document url-prefix() { .selector { property: value; } }
支持所有Gecko内核的浏览器 (包括Firefox)
*>.selector { property: value; }
@media screen and (-webkit-min-device-pixel-ratio: 0) { Selector { property: value; } }
html:first-child>b\ody Selector {property:value;}
IE 浏览器针对不同的版本有不同个Hack方式。
:root Selector {property: value\9;}
Selector {property: value\9;}
Selector {property: value/;} 或: @media \0screen { Selector {property: value;} }
Selector {property: value\0;}
*+html Selector{property:value;} 或: *:first-child+html Selector {property:value;}
Selector {*property: value;}
Selector { _property: value; } 或者: *html Selector { property: value; }
The above is the detailed content of Browser CSS Hack Collection. For more information, please follow other related articles on the PHP Chinese website!