任何人都可以复制此jquery效果吗? [英] Can anybody make a copy of this jquery effect?

查看:70
本文介绍了任何人都可以复制此jquery效果吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图花费数小时来模仿这个 http://buildinternet.com/project/supersized/扩大舞会演示,我每次都会失败.任何人都可以在jsfiddle上提供帮助并进行复制吗?

I am trying for hours to copycat this http://buildinternet.com/project/supersized/ expanding ball demo and I am failing every time. Can anybody help and make a copy on jsfiddle?

推荐答案

查看演示


CSS(使它变得更圆滑):

Checkout the demo


CSS (to make it round):

-moz-border-radius:360px;
 -webkit-border-radius:360px;
 border-radius:360px;

jQuery:

var origWidth, origHeight, inrease = 50;

$('#hello').hover(function(){
  origWidth = $(this).width();
  origHeight = $(this).height();  
  
  // expand it
  $(this).animate({width:origWidth + inrease, height:origHeight + inrease});
  
}, function(){
  $(this).animate({width:origWidth, height:origHeight});
});

这篇关于任何人都可以复制此jquery效果吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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