Take a look at this jsFiddle. With CSS animations gaining popularity, I am interested in creating an effect where an element (.box
) expands with an animation when the mouse hovers over it. The challenge is to keep the center of the element fixed while enlarging, without affecting the position of other elements around it.
If I knew the exact width of the elements, I could achieve this by using wrapper elements and relative positioning for each element to animate its width, height, left, and top properties. However, the example I'm working on involves elements with variable widths.
If achieving this effect proves to be impossible, do you have any alternative suggestions?