<!DOCTYPE html>
<html>
<head>
<title>practice1</title>
<style>
.window{width:100%;height:700px;}
#window1{background:black; color:white;}
#window1>#x1>h1 {font-size:10px}
#window2{background:green; color:white;}
#window3{background:yellow; color:black;}
#window4{background:white; color:black;}
#window5{background:red; color:white;}
</style>
</head>
<body>
<div id="window1" class="window">
<div id="x1">
<h1>fade it</h1>
</div>
</div>
<div id="window2" class="window">
<div id="x2">
<h1>fade it</h1>
</div>
</div>
<div id="window3" class="window">
</div>
<div id="window4" class="window">
</div>
<div id="window5" class="window">
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="TweenMax.min.js" type="text/javascript"></script>
<script src="jquery.superscrollorama.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var controller=$.superscrollorama();
TweenMax.to("x1",5,{fontSize:50px});
controller.addTween("#x2", 3, TweenMax.to("#x2", 3, {scale:2,color:blue}));
});
</script>
</body> I was working on a website using superscrollorama but it did not work. So I decided to do a practice but still this simple code is not working. I have included everything in the above file, you just have to use greensock's TweenMax.min.js and jquery.superscrollorama.js to check the file. I am realy frustrated right know and I know that there is only minute mistake but can anyone help me figure out please. Thanking in advance.发布于 2014-03-07 03:16:02
嘿!
请注意,Superscrollorama已经被ScrollMagic取代:https://github.com/janpaepke/ScrollMagic
然而,您的错误是在addTween的参数中。
在superscrollorama文档中你可以看到这个:.addTween(target, tween, duration, offset, reverse)
你的第二个参数是3,它应该是补间...
这个与补间和超actually参数的混淆实际上是ScrollMagic已经修复的事情之一。
所以,试一试吧!:)
致以敬意,
1月
https://stackoverflow.com/questions/22218524
复制相似问题