css3 - jQuery Mobile retina display image option? -


is there simple way display retina size images on correct device , standard on others? i've been search online people suggest using jscript. want 32x32 images load on. size should retina icon be, 32, 36 width or higher? in comparison 16 standard width icon

@media screen , (-webkit-min-device-pixel-ratio:1.5),only screen , (min--moz-device-pixel-ratio:1.5),only screen , (min-resolution:240dpi){ .shopping_icon {background-image:url(../images/shop_icon.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px;} 

would work?

#track .ui-icon{background:url(../simgs/track_icon.png) 50% 50% no-repeat;background-repeat:no-repeat;width:36px !important;height:36px !important;margin:-5px 0 0 -18px;} @media screen , (-webkit-min-device-pixel-ratio: 1.5), screen , (max--moz-device-pixel-ratio: 1.5) {     #track .ui-icon {     background: url(../simgs/track_icon.png);     background-size:36px 36px;     } } 

the device-pixel-ratio should 2 retina. icon image file should 36x36 , css background-size 18x18 squeeze down.

refer last section of post: http://www.andymatthews.net/read/2011/02/13/creating-and-using-custom-icons-in-jquery-mobile


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -