Change background color to black for small screen - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Change background color to black for small screen

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
@media screen and (max-width:480px) {
   body {<!--from w  w w .j  a v a 2  s .co  m-->
      background-color:Chartreuse;
   }

}
</style> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials