如何在famo.us ScrollView中更改默认动画 我有10个表面的简单滚动视图:
define(function(require, exports, module) {
var Engine = require("famous/core/Engine");
var Surface = require("famous/core/Surface");
var Scrollview = require("famous/views/Scrollview");
var mainContext = Engine.createContext();
var scrollview = new Scrollview({
direction: 0,
paginated: true
});
var surfaces = [];
scrollview.sequenceFrom(surfaces);
for (var i = 0; i < 10; i++) {
surface = new Surface({
content: "Surface: " + (i + 1),
size: [window.innerWidth, window.innerHeight],
properties: {
backgroundColor: "hsl(" + (i * 360 / 10) + ", 100%, 50%)",
lineHeight: window.innerHeight/10 + "px",
textAlign: "center"
}
});
surface.pipe(scrollview);
surfaces.push(surface);
}
mainContext.add(scrollview);
});
现在它只是从右向左滑动 如何制作这样的动画,有办法吗? http://www.idangero.us/sliders/swiper/plugins/progress.php