Using @media to change font - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Media

Description

Using @media to change font

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">
#aaa {<!--from   w  w  w  . j  ava 2s . c  o m-->
   color:Chartreuse;
   font-size:51px;
   text-align:center;
}

@media (max-width : 480px)  {
   #aaa {
      color:yellow;
      font-size:100px;
      text-align:left;
   }

}
</style> 
 </head> 
 <body> 
  <div id="aaa">
    Lorem 
  </div>  
 </body>
</html>

Related Tutorials