HTML CSS examples for CSS Layout:Responsive Layout
Responsive web CSS rules
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- w ww.ja v a 2 s. c o m--> width:201px; height:100px; background-color:Chartreuse; } @media only screen and (min-width: 480px) { div { width:301px; background-color:yellow; } } @media only screen and (min-width: 600px) { div { width:401px; background-color:blue; } } </style> </head> <body> <div></div> </body> </html>