简体   繁体   中英

inline CSS hack for ie6, ie7 and ie8

Does anyone know of a way to hide a single line of CSS to ie6,7 and 8 exclusively so that they simply don't see that line?

I'd like to be able to hide the a media query start and end so that those browsers just see what's inside the query.

I don't want to use conditional comments. It must be inline.

I know that sounds strange but I have my reasons! - If I have a mobile first cascade approach to my media queries but can show what's inside those queries to these browser then all modern browsers can be responsive but older browsers just get the final media query which in this case would be the desktop version.

thanks in advance!

it's not “inline” but it doesn't use conditional comments... try simply with

@media all and (min-width:0) {
   /* your rules here */
}

you will target any modern browser and IE9

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM