Joined May 2012
·

Ram Ratan Maurya

Front End Developer and WordPress Guy at Codestag
·
Varanasi, IN
·
·
·

It’s available only above Safari 6 and Chrome 21. As of now, it’s still a CSS4 spec I guess. So there isn’t going to be any cross browser solution anytime soon.

You saved my day John, I was looking for exactly this.

Unfortunately not, but you can do this.

body{
    background-image:  url('path/to/image');
    background-image: -webkit-image-set( url('path/to/image') 1x, url('path/to/high-res-image') 2x );
}

And then use @media syntax to define @2x image.
This syntax is future proof, works in current versions of Safari and Chrome. Waiting for the day when other browser implements it as well.

Posted to Don't Use CSS "display: none" over 1 year ago

How about attribute hidden?

Error with the link!

Achievements
274 Karma
18,355 Total ProTip Views