html5 - Phonegap css background image dpi -


i building phonegap app ios , having problems css image backgrounds. example have div spans on 100% of viewport. want use real resolution images pixel perfection.

<div class="main"></div> <style> .main { width: 100% height: 100%; background: transparent url('640×1136.jpg') } </style> 

so want display 640×1136 image background. viewport 320px wide making background image stretched.

can somehow make web view use real pixels instead?

you can use background-size attribute:

background-size: contain 

or:

background-size: cover 

you have more information in "background-size"


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -