Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

@media css

.img-retina {
  background-image: url("img/example-img.jpg");
  background-size: 320px 320px;
}

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (   min--moz-device-pixel-ratio: 2),
       only screen and (     -o-min-device-pixel-ratio: 2/1),
       only screen and (        min-device-pixel-ratio: 2),
       only screen and (                min-resolution: 192dpi),
       only screen and (                min-resolution: 2dppx) {
    background-image: url("img/example-img@2x.jpg");
    background-size: 320px 320px;
}
Source by kia-king.com #
 
PREVIOUS NEXT
Tagged: #css
ADD COMMENT
Topic
Name
1+7 =