Reputation: 14250
I want to create a zoom in effect on my large div. I have searched many questions and still don't know how this work.
I want to be able to zoom into the center of the user screen instead of the set position.
I have tried css3 zoom
feature and animate
zoom
property but still can't pull this one. Can anyone help me about it? Thanks a lot!
Upvotes: 0
Views: 1008
Reputation: 84
You should scale the div:
.scaled {
-moz-transform: scale(3);
-webkit-transform: scale(3);
-ms-transform: scale(3);
transform: scale(3);
}
div {
transition: all 500ms ease-in;
}
Simply apply the CSS class to the div and then use the transitionEnd
event to apply further styles via .animate()
.
On transitionEnd
(discard live()
, use on()
): jsfiddle
Upvotes: 2