html - Find the browser version using css -
i have problem ie8, need apply css if browser not ie8
in html can using
<!--[if lt ie 9]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]--> <!--[if lte ie 8]> <link rel="stylesheet" type="text/css" href="ie8-and-down.css" /> <![endif]-->
but want filter using css
is there way can instruct browser apply these styles if not ie8 ?
for example, how can make css not have impact in ie8?
@font-face{ //some css }
conditional comments work (<!--[if lte ie 8]><stylesheet><![endif]-->)
, if want in stylesheet, there is way:
body { color: red; /* browsers, of course */ color: green\9; /* ie */ }
the important thing here "\9", has "\9". i'm not clear on why is.
edit: \9 hack isn't enough itself. exclude ie9, need :root
hack:
:root body { color: red\9; /* ie9 */ }
other browsers besides ie might support :root, combine \9 hack if you're using target ie9.
ie6
lastly, have underscore hack, designers familiar now. rather * symbol, use underscore. target internet explorer 6.
body { color: red; /* browsers, of course */ color : green\9; /* ie8 , below */ *color : yellow; /* ie7 , below */ _color : orange; /* ie6 */ }
for more information
Comments
Post a Comment