Sunday, May 10, 2015

Hello World Responsive Web Page

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@media (max-width: 750px) { 
   p{font-size:200%;} 
}
</style>
<p>
   Hello World
</p>

The code above will display "Hello World" twice as large when the screen has a maximum width of 750 pixels, such as that of an iPhone 6.

To run this code, create a text file with the code above and save it with an html extension, then run it in a browser. This code snippet can be viewed running at http://travelphrase.com/hello-world.html


No comments:

Post a Comment