问题
this is the media query:
<link rel="stylesheet" media="screen and (min-device-width: 1024px)" href="desktop.css"/>
<link rel='stylesheet' media='screen and (min-width: 1023px) and (max-width: 1025px)' href='ipad.css' />
so that i get different style in size of 1024px but this worked on all browsers except chrome the new style appears in size of 1041px
is there any way to target chrome only to give it ipa style in different size
回答1:
The following can be used to target CSS for Chrome (and Safari, as both are WebKit based):
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* CSS rules */
}
See Question on webkit-min-device-pixel-ratio
来源:https://stackoverflow.com/questions/8897063/is-it-possible-to-target-chrome-by-html-or-media-query-only