var paper; window.onload = function(){ paper = Raphael(0,0,"100%","100%"); c =paper.circle($(window).width()/2, $(window).height()/2, 100) .attr({fill:"r(0.7,0.7)#f0a-#c05", stroke:"none"}); c.hover(circle_hoverin, circle_hoverout,c,c); } function circle_hoverin(){ this.animate({r:80}, 1000,"elastic"); } function circle_hoverout(){ this.animate({r:100}, 1000,"elastic"); }
<script type="text/javascript" src="http://dl.dropbox.com/u/63305355/raphael-min.js"></script> <div id="canvas"> <div class="text"> ANIMATE <div id="result"></div> </div> </div>
body,html { height:100%; margin:0; } #canvas { height:99%; background:#fff; text-align:center; } .text{ letter-spacing: 0px; color:#fff; font-size:150%; position:absolute; text-align:center; top:40%; left:0%; width:100%; z-index:1; background:#000; opacity:0.5; } #result{ font-size:60%; letter-spacing: 5px; } input{ padding:3px; }