Tuesday, 15 January 2013

javascript - How to .animate() a background-image size -



javascript - How to .animate() a background-image size -

can .animate background-image size javascript/jquery?

the code wt_r , ht_r screen size. can create dynamic .animate()?

$('#outer').css('background-size',wt_r+' '+ht_r);

jsfiddle- http://jsfiddle.net/m7zmzkpz/1/

when resize browser window background image should resize – x10nd 3 mins ago

no js needed @ all...

background-size:100% 100%; // or 100% maintain aspect-ratio

http://jsbin.com/varecu/1/edit?html,css,js,output

animate on page load? no js needed @ all:

http://jsbin.com/xuhuca/1/edit?html,css,js,output

want maintain aspect ratio fill spaces? background-size: cover;

http://jsbin.com/varecu/2/edit

(resize window on demos see magic. background-image resizes!)

javascript jquery

No comments:

Post a Comment