How do you achieve the image scrolling effect at the top of this web page? Thank you_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:46
Original
1366 people have browsed it

This is it: http://www.nilock.com/2011/05/19/a-parallax-scrolling-demo/comment-page-1/

Please help me take a look, thank you , I am a newbie...


Reply to discussion (solution)

Constantly modify
background-position

Apply Made with js

These clouds are all the same picture, and then use JS to make them move. It looks layered. Both CSS3 and JS can do it!

$( function($) {	        var current = 0;		setInterval(function(){	       if(current==-6000) {current=0;}	       current -=600;	       $('#header-background').animate({backgroundPosition:current+"px 0px"},25000);	    },2500);	}) 
Copy after login

Modify background-position

JScript code

$( function($) {
var current = 0;
setInterval( function(){
if(current==-6000) {current=0;}
current -=600;
$('#header-background').an......

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template