Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

How to Create Retina Graphics for your iphone or ipad


Retina Images serves different images based on the device being used by the viewer.

If your images not looking sharper in iphone or ipad Retina you need to make some change as following in your css. 

Suppose you have a logo.png(100px*50px) for normal browser view. You need to create double size of images for Retina. Like...

Your logo.png becomes (200px*100px) for Retina.

'<div class="logo"></div>'

Now add following css changes on top of your css file.

@media only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1), 
only screen and (-webkit-min-device-pixel-ratio: 2), 
only screen and (min-device-pixel-ratio: 2){
     .logo{
           background: url("../images/nbitcoin@2x.png") no-repeat;
           background-size: 100px 50px;
}


Please support us, Like us on Facebook.

0 comments:

Post a Comment

 

Copyright @ 2017 HKBlog.