Skip to content

Instantly share code, notes, and snippets.

@hullen
Last active December 21, 2015 01:08
Show Gist options
  • Save hullen/6225062 to your computer and use it in GitHub Desktop.
Save hullen/6225062 to your computer and use it in GitHub Desktop.
iOS Media Queries
/**
iOS Media Queries
compatível com iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2
Author @hullen
Fique a vontade em utilizar, colaborar e compartilhar!
*/
/**
iPhone (4/4S) - modo paisagem
cor do link: laranja com fundo verde
*/
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
a {
background-color: green;
color: orange;
}
}
/**
iPhone (4,4S) - modo retrato
cor do link: vermelho com fundo azul
*/
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
a {
background-color: blue;
color: red;
}
}
/**
iPhone todos - modo paisagem
cor do link: laranja
*/
@media all and (max-device-width: 480px) and (orientation: landscape) {
a {
color: orange;
}
}
/**
iPhone (todos) - modo retrato
cor do link: preto
*/
@media all and (max-device-width: 480px) and (orientation: portrait) {
a {
color: black;
}
}
/**
iPad - modo paisagem
cor do link: verde
*/
@media all and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
a {
color: green;
}
}
/**
iPad - modo retrato
cor do link: amarelo
*/
@media all and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
a {
color: yellow;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment