Skip to content

Instantly share code, notes, and snippets.

@purwandi
Created December 31, 2015 07:45
Show Gist options
  • Save purwandi/bba3763eca0b35771d7e to your computer and use it in GitHub Desktop.
Save purwandi/bba3763eca0b35771d7e to your computer and use it in GitHub Desktop.
/* 1x Image */
#brb-image {
  width: 360px;
  height: 350px;
  margin-left: auto;
  margin-right: auto;
  background-image: url('/brb_1x.png');
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;
}

/* 2x Image */
@media only screen and (-webkit-min-device-pixel-ratio: 2), 
  only screen and (-moz-min-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) {
    #brb-image {
      background-image: url('/brb_2x.png');
      -webkit-background-size: 360px 350px;
      -moz-background-size: 360px 350px;
      -o-background-size: 360px 350px;
      background-size: 360px 350px;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment