Skip to content

Instantly share code, notes, and snippets.

@gliheng
Created March 29, 2013 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gliheng/5268187 to your computer and use it in GitHub Desktop.
Save gliheng/5268187 to your computer and use it in GitHub Desktop.
media query targeting iphone & ipad
<link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="http://example.com/iPhone.css" />
<link type="text/css" rel="stylesheet" media="only screen and (min-device-width: 768px) and (max-device-width: 1024px)" href="http://example.com/iPad.css" />
/* iPad [portrait + landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
}
/* iPhone [portrait + landscape] */
@media only screen and (max-device-width: 480px) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment