javascript - How to make absolute positioning images to stay fixed like background-attachment: fixed; -
i use backstretch.js cross browser background images cover. how can set images stay fixed on block background-attachment: fixed ?
i know there jquery way set background-image positioning fixed cross browser
$(window).scroll(function() { var scrolledy = $(window).scrolltop(); $('.first-block').css('background-position', 'center ' + ((scrolledy)) + 'px'); }); but code freezes in mac os , ios.. there method add code images not background images? or method remove freezes..? if there not freezes i'll delete backstretch.js , make scrolling background images..
jsfiddle demo 1 on demo can see emulating background-position: fixed jquery. freezes on mac os , ios. on windows fine! how can remove freezes?
jsfiddle demo 2 on demo can see action backstretch.js makes full size images cross browser. how can set scroll in demo 1 ?
Comments
Post a Comment