页面转换 - 避免“闪烁” [英] Page Transitioning - Ways to Avoid the "flicker"

查看:125
本文介绍了页面转换 - 避免“闪烁”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否还有避免闪烁或用某种类型的其他过渡替换它?我不介意使用JavaScript或jQuery,如果我需要 - 这也只是指从一个网页到另一个(所有都在同一个网站)的转换。

I was wondering if there were anyways to avoid the "flicker" or to replace it with some type of other transition? I don't mind using JavaScript or jQuery if I needed to - also this is only referring to transitions from one web page to another (all are on the same site).

感谢所有!

推荐答案

我相信你可以使用jQuery通过类似的东西处理转换:

I believe you can use jQuery to handle transitions via something similar to this:

<script type="text/javascript">
    $(document).ready(function() {
        $("body").css("display", "none");
        $("body").fadeIn(2000);
    });
</script>

这是一个关于使用jQuery页面切换的教程

您还可以在HTML的标题部分使用以下行:(仅IE)

You can also use the following line in the header section of your HTML: (IE Only)

<meta http-equiv="Page-Enter" content="progid:DXImageTransform.Microsoft.Fade(Duration=2)">
<meta http-equiv="Page-Exit" content="progid:DXImageTransform.Microsoft.Fade(Duration=2)">

对于那些我建议一个小的持续时间(< 1.0)如果你只是想删除闪烁 - 但你可以玩这些设置。

For those I would recommend a small duration (<1.0) if you just want to remove the "flicker" - but you can play around with those settings.

这篇关于页面转换 - 避免“闪烁”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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