It was mentioned in previous articles IE6 /IE7/IE8/ IE9 /Firefox's CSS HACK method. What is Safari's CSS HACK?
See the following CSS code:
.box
{
color: black; /* ff */
color: #fff\9\0; /* IE9 */
color: #ff0000\0; /* IE8 */
[color: #666; color: #999; /* Safari Chrome */
*color: green; /* IE7 */
_color: blue; /* IE6 */
}
@media all and (min-width: 0px){
/*Safari and Opera browser Common Styles for*/
}
@media all and (-webkit-min-device-pixel-ratio:0){
/*Select {[; here Safari style is set separately]}*/
select{ [;color:#666;] }
}
HTML code
<div class="box">
Here, different colors are displayed according to the CSS HACK of different browsers!
</div>
In IE6 browser typeface The color is blue;
The font color is green in IE7 browser;
The font color is red in IE8 browser;
The font color is white in IE9 browser;
The font color is black in Firefox browser;
The font color is gray in Safari and Chrome browsers.