![]() |
distorting image on mouseover
I'm getting ready to look at redoing a div rollover effect, wherein a div expands on mouse-over and contracts back to its original size on mouse-out.
I see two problems right now: The contained images stretch and distort with the animation. I want them to stay proportional. Also, I may need to figure out some sort of state checking? If I mouse off of the div quick enough, or several times, it'll start shrinking - I'm assuming because I moused-off before it could register anything? Not sure. Getting ready to look into this, and I thought I'd see if anybody here could point me in the right direction. Here's what I have: html: Code:
<!-- a sample div to animate on mouseover -->Code:
$(".square.one,#link_nest").mouseenter(function(){Code:
#cf { |
update
I just managed to constrain the image by setting only one dimension of the image - at 120% of the div, and not showing overflow.
Seems to solve this part of the problem, unless there's a reason this is a bad way to do it? I did it like this: Code:
<div class="square one" style="overflow:hidden;"> |
| All times are GMT +1. The time now is 05:45 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.