Testando Media Queries
+![Acessando via smartphone](imagens/icon-phone.png)
![Acessando via tablet](imagens/icon-tablet.png)
![Versão para impressão](imagens/icon-print.png)
![Versão para desktop](imagens/icon-pc.png)
![Versão para TV](imagens/icon-tv.png)
diff --git a/exercicios/ex025/mq004/estilos/media-query.css b/exercicios/ex025/mq004/estilos/media-query.css new file mode 100644 index 0000000..20fd73e --- /dev/null +++ b/exercicios/ex025/mq004/estilos/media-query.css @@ -0,0 +1,53 @@ +@charset "UTF-8"; + +/* Todas as demais mídias */ + +/* +Typical Device Breakpoints +------------------------------ +Pequenas telas: até 600px +Celular: de 600px até 768px +Tablet: de 768px até 992px +Desktop: de 992px até 1200px +Grandes telas: acima de 1200px +*/ + +@media print { /* Impressora */ + +} + +@media screen and (min-width: 768px) and (max-width: 992px) { /* Tablet */ + body { + background-image: url(../imagens/back-tablet.jpg); + } + + img#phone { display: none; } + img#tablet { display: block; } + img#print { display: none; } + img#pc { display: none; } + img#tv { display: none; } +} + +@media screen and (min-width: 992px) and (max-width: 1200px) { /* Desktop */ + body { + background-image: url(../imagens/back-pc.jpg); + } + + img#phone { display: none; } + img#tablet { display: none; } + img#print { display: none; } + img#pc { display: block; } + img#tv { display: none; } +} + +@media screen and (min-width: 1200px) { /* Grandes Telas */ + body { + background-image: url(../imagens/back-tv.jpg); + } + + img#phone { display: none; } + img#tablet { display: none; } + img#print { display: none; } + img#pc { display: none; } + img#tv { display: block; } +} \ No newline at end of file diff --git a/exercicios/ex025/mq004/estilos/style.css b/exercicios/ex025/mq004/estilos/style.css new file mode 100644 index 0000000..a01b929 --- /dev/null +++ b/exercicios/ex025/mq004/estilos/style.css @@ -0,0 +1,48 @@ +@charset "UTF-8"; + +/* Versão Mobile First */ + +* { + font-family: Arial, Helvetica, sans-serif; + font-size: 1em; + margin: 0px; + padding: 0px; + box-sizing: border-box; +} + +html { + height: 100vh; +} + +body { + background: black url(../imagens/back-phone.jpg) no-repeat; + background-size: cover; + background-position: center center; +} + +main { + background-color: rgba(255, 255, 255, 0.685); + width: 80vw; + margin: auto; + margin-top: 20px; + border-radius: 10px; + padding: 10px; +} + +h1 { + text-align: center; + color: white; + font-size: 2em; + text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5); +} + +img { + display: block; + margin: auto; +} + +img#phone { display: block; } +img#tablet { display: none; } +img#print { display: none; } +img#pc { display: none; } +img#tv { display: none; } \ No newline at end of file diff --git a/exercicios/ex025/mq004/index.html b/exercicios/ex025/mq004/index.html index b43cf2e..896eb8b 100644 --- a/exercicios/ex025/mq004/index.html +++ b/exercicios/ex025/mq004/index.html @@ -4,8 +4,17 @@