CSS hack only for Chrome

转贴:http://stackoverflow.com/a/23594288

@media all and(-webkit-min-device-pixel-ratio:0)and(min-resolution:.001dpcm){#selector { background: red;}} 如果用 
@media screen and(-webkit-min-device-pixel-ratio:0) { 
 #selector { background: red;} }
会针对Chrome和Safari起作用,不止是Chrome.

 

 

你可能感兴趣的:(CSS hack)