0
이 효과를 재현하는 나는 꽤 오랫동안 웹 디자인에서 봤는데 사람이 내게 도움을 요청했다가 : http://www.jetsetter.com/destinations/italy?nm=destinationsJQuery와 웨이 포인트는 지원
나는 다른 사람의 도움으로 여기에 아주 가까이받은,하지만 지금 한 배경을 변경할 수 없습니다. 배경색을 변경할 때 작동하지만 배경 이미지는 변경되지 않습니다.
누구든지 내가보고 싶었던 것을 볼 수 있습니까?
$(document).ready(function(){
// attach a waypoint to each div.waypoint element
// the callback is executed every time the user scrolls past
// see http://imakewebthings.com/jquery-waypoints/#docs
$('.waypoint').waypoint(function(direction){
// you can use the direction parameter here to check which way the user was scrolling if you need
// get the background-image source from the data-src property on the DOM element
var backgroundSrc = $(this).attr('data-src');
// now update the CSS for the body
$(document.body).css({
'background-image': backgroundSrc
});
});
});