jParallax麻烦 [英] jParallax trouble

查看:83
本文介绍了jParallax麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家好!我有这个插件的问题。我不知道这里有什么问题...我所做的与示例中的相同。



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; height: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;
仓位:绝对;
溢出:隐藏;
宽度:700px;
身高:300px;
}

JS

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

没有任何事情......图片没有任何动作......任何想法?

解决方案

不幸的是他的网站暂时没有更新,你可以从他的GitHub repo获得版本1.0,该版本适用于jQuery v1.7(撰写本文时的最新版本。)



https:/ /github.com/stephband/jparallax jParallax github


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; height: 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

这篇关于jParallax麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆