开发者

jParallax trouble

开发者 https://www.devze.com 2023-03-10 14:14 出处:网络
Hey everyone! I have a problem with this plugin. I have no idea what is wrong here... All I did was the same as in the examples.

Hey everyone! I have a problem with this plugin. I have no idea what is wrong here... All I did was the same as in the examples.

HTML

<div id="parallax"> 
    <div style="width: 830px; height: 280px;">  
        <img style="position:absolute; top:0px; left:350px;" alt="" src="images/smile1.png"/>  
    </div>  
    <div style="width: 800px; 开发者_如何学JAVAheight: 250px;">  
        <img style="position:absolute; top:200px; left:0px;" alt="" src="images/smile1.png"/>  
    </div>  
    <div style="width: 1000px; height: 260px;">  
        <img style="position:absolute; top:100px; left:150px;" alt="" src="images/smile1.png"/>  
    </div> 
</div> 

CSS

#parallax { 
    background:#ccc;  
    position:absolute;  
    overflow:hidden; 
    width:700px;  
    height:300px;  
} 

JS

   <script type="text/javascript">  
   jQuery(document).ready(function(){ 
       jQuery('#parallax').jparallax({}); 
   }); 
   </script>  

and nothing happened... pictures are standing without any movements... any ideas?


Unfortunately his site has not been updated for a while, you can get version 1.0 from his GitHub repo which works with jQuery v1.7 (latest version at the time of writing).

https://github.com/stephband/jparallaxjParallax github

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号