流星中的页面过渡? [英] Page transitions in meteor?

查看:79
本文介绍了流星中的页面过渡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个结构上的流星移动应用程序;我确实需要将视图与一些页面过渡结合在一起.

I've got a meteor mobile app structurally working; I really need to stitch the views together with some page transitions.

我查看了 iron-transitioner 项目,但看起来开发已经停止了吗? (最近一次提交是在6个月前,仍在使用Spark引擎)

I looked at the iron-transitioner project but it looks like development has ceased? (last commit 6 months ago, still using Spark engine)

我还研究了一些UI移动框架"(Ratchet,Framework7),但是我无法让它们在流星服务器上很好地发挥作用.

I've also looked at a few UI 'mobile frameworks' (Ratchet, Framework7) but I couldn't get them to play nicely with the meteor server.

我想知道是否有人知道我可以尝试的其他任何简单(左/右)页面过渡包/脚本?仅仅是为了让我的UI真正具有一些(预期的)光滑感.

I'm wondering if anyone knows of any other simple (left/right) page transition package / script that I could try? It's just to give my UI some (expected) slickness really.

推荐答案

使用IronRouter的jQuery怎么样?

What about some jQuery with IronRouter?

Router.configure({
  load: function() {
    $('.content').animate({
      left: "-1000px",
      scrollTop: 0
    }, 400, function() {
        $(this).animate({ left: "0px" }, 400);
    });
});

为了使页面之间平滑过渡,我还要做的是使用简单的fadeIn/fadeOut.

What I also do to make a smooth transition between pages is to use a simple fadeIn/fadeOut.

Router.configure({
  load: function() {
    $('html, body').animate({
      scrollTop: 0
    }, 400);
    $('.content').hide().fadeIn(800);
  }
});

这篇关于流星中的页面过渡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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