gpt4 book ai didi

jquery - 本网站使用的淡入淡出/脉冲效果

转载 作者:行者123 更新时间:2023-12-01 04:27:17 24 4
gpt4 key购买 nike

我尝试过搜索,但找不到明确的答案,有谁知道 Stackoverflow 使用什么通过淡入橙色突出显示来突出显示页面的更改?

这只是 jquery 淡入淡出还是某种脉动效果?

例如,我有一个页面,当用户在不同位置单击时,我会更改一些元素,我想通过像 StackOverflow 一样对这些页面更新进行脉动来引起人们的注意。

假设是jquery,只是不确定是什么效果。

谢谢。

最佳答案

查看了一下源代码后,找到了执行“脉冲”的确切代码:

// if you have firebug, run this in the console, it will first hide all
$("#notify-container div").hide();
$("body").css('marginTop','0px');
// this actually show the pulse
$("#notify-container div").fadeIn("slow");
$("body").animate({
marginTop: "2.5em"
}, "fast", "linear");

你需要更好的reverse engineering技能,尤其是当您拥有源代码时。

请注意,主体动画有几个变量可确保 marginTop 具有正确的大小。这个确切的代码用于新用户,给出通知:

Welcome to Q&A for professional and enthusiast programmers — check out the FAQ!

关于jquery - 本网站使用的淡入淡出/脉冲效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5604186/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com