Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Media queries demo</title>
- </head>
- <body>
- <div class="colorDiv"> A sample text</div>
- <style>
- @media screen and (min-width:320px) {
- .colorDiv {
- background-color:yellow;
- color:white;
- }
- }
- @media screen and(min-width:480px){
- .colorDiv {
- background-color:blue;
- color:white;
- }
- }
- @media screen and(min-width:1025px){
- .colorDiv {
- background-color:green;
- color:white;
- }
- }
- @media screen and(min-width:1281px){
- .colorDiv {
- background-color:red;
- color:white;
- }
- }
- </style>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement