Responsive Web Design Principles -3 Use a Retina Image for Higher Resolution Displays

Use a Retina Image for Higher Resolution Displays

he simplest way to make your images appear "retina" (and optimize them for retina displays) is to define their width and height values as only half of what the original file is.
Here is an example of an image that is only using half of the original height and width:



<style>
img { height: 250px; width: 250px; }
</style>
<img src="coolPic500x500" alt="A most excellent picture">  
 
compare between two pictures in quality

1. height:250px; width:250px;

2.height:500px; width:500px; 


Comments

Popular posts from this blog

ES6 : 5 Prevent Object Mutation

ES6: 1 Explore Differences Between the var and let Keywords

CSS Grid: Reduce Repetition Using the repeat Function