Last active
October 2, 2017 11:44
-
-
Save kozhin/9dd6a9692328ff73cf4d to your computer and use it in GitHub Desktop.
Background image for retina screens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background-color: transparent; | |
background-size: 100px 100px; | |
background-repeat: no-repeat; | |
background-position: top center; | |
background-image: url("bg.png"); | |
@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("[email protected]"); | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 3), | |
only screen and ( min--moz-device-pixel-ratio: 3), | |
only screen and ( -o-min-device-pixel-ratio: 3/1), | |
only screen and ( min-device-pixel-ratio: 3), | |
only screen and ( min-resolution: 384dpi), | |
only screen and ( min-resolution: 3dppx) { | |
background-image: url("[email protected]"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment