StackOverflow 为 Tag Popup 使用什么类型的动画? [英] What type of animation does StackOverflow use for Tag Popup?

查看:12
本文介绍了StackOverflow 为 Tag Popup 使用什么类型的动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道 Stackoverflow 的 Tag 弹出窗口使用什么类型的(jQuery?)动画?标签弹出窗口是指当您将鼠标悬停在 Stackoveflow 中的标签上时,会出现一个弹出窗口,动画从左上角到右下角开始,有人知道它使用哪种类型的动画吗?

Does anyone know what type of (jQuery?) animation does Stackoverflow use for its Tag popup? By Tag popup I mean when you hover over a Tag in Stackoveflow a popup appears, the animation starts from top left to bottom right, does anyone know which type of animation it uses?

推荐答案

.show( time )方法

$('a.post-tag').hover(function(){
  
  var $this = $(this);
  var offset = $this.offset(); 
  var myPos = {X: offset.left, Y:offset.top+26}; 
  $('#tag-menu').css({left:myPos.X, top:myPos.Y, width:300, height:200}).show(400);
                                                                       // ^^^TADA !!
   
}, function(){
  
  $('#tag-menu').stop(1,1).hide();
  
});

这篇关于StackOverflow 为 Tag Popup 使用什么类型的动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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