jquery - Changing Background Image on Change in Device Width -


i have full screen background image. problem face gets chopped when viewing website mobile handset.

what have focus object getting viewed in mobile. have cropped image mobile dimensions of focus object. code detect mobile device , change background:url(); normal image if device tablet or desktop cropped version of image if smartphone being used. unaware how might take place. know jquery , @media rules me.

with media object check if current screen size bigger 768. if #bg values overwritten.

#bg {   background-image: url('small.jpg'); }  @media (min-width: 768px) {   #bg {     background-image: url('big.jpg');   } } 

Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

Python Error - TypeError: input expected at most 1 arguments, got 3 -

dns - How To Use Custom Nameserver On Free Cloudflare? -