How to write CSS for Chrome Browser only

Sometime situation appears that all over things are working pretty fine on other web browsers except chrome. For writing the things specific to chrome use this code :

@media screen and (-webkit-min-device-pixel-ratio:0) { 

}

and wrap all the things of CSS inside this code. It will apply specifically to chrome browser only.

JavaScript Solution :

if (navigator.appVersion.indexOf("Chrome/") != -1) {
// modify button 
}