HTML CSS examples for CSS Layout:Responsive Media
Using @media to change font
<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>