html - I do not know how to use media selectors in my css file correctly to decide which image to load for iPhone or iPad -


there several html files guide user through our app , introduce him new features. universal app iphone , ipad. if user selects section iphone version, want show him images scaled iphone device.

but there problem. in css file there 1 class boximage images. how decided image load? should stuck each image in own class?

thanks in advance 4 ideas!

regards, buk

you can try this.

 <style type="text/css">    @media , (max-width: 800px) {     .boximage{ background:url(image_name1.jpg)}     }     @media , (min-width: 800px){      .boximage{ background:url(image_name2.jpg)}     }</style> 

or use javascript find user-agent , set image script.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -