JSFiddle - React, Tailwind, and code Playground
by Mariagrazia_Lunghi
HTML
<!doctype html>
<html>
<head>
<title>Media queries</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
</head>
<body>
<div></div>
</body>
</html>
CSS
@import url(http://fonts.googleapis.com/css?family=Changa+One);
div{
width: 250px;
line-height: 50px;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
margin: -35px 0 0 -135px;
font-family: 'Changa One', cursive;
border: 10px solid black;
font-size: 20px;
}
div:after{
content: 'desktop pc'
}
@media screen and (min-width: 321px) and (max-width: 480px){
div:after{
content: 'iphone orizzontale'
}
}
@media screen and (max-width: 320px) {
div:after{
content: 'iphone verticale'
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 321px) and (max-width: 480px){
div:after{
content: 'iphone4 orizzontale'
}
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 320px){
div:after{
content: 'iphone4 verticale'
}
}
@media screen and (min-width: 769px) and (max-width: 1024px){
div:after{
content: 'ipad orizzontale'
}
}
@media screen and (min-width: 481px) and (max-width: 768px) {
div:after{
content: 'ipad verticale'
}
}