Home › Forums › CSS › Giving bouncing effects to the image without changing its position on the page.
- This topic is empty.
-
AuthorPosts
-
May 28, 2013 at 3:00 am #45249PSPParticipant
Hi Friends,
I have an image on the page, now I want to add some bouncy or spring motion effects to the image, I know this is very easy but my idea is to do this effect without changing the image position on the screen, I mean consider image has four corners (x1,y1)(x2,y1)(x2,y2)(x1,y2),
now i want to add those effects without changing these coordinates of image.I tried in this way: animate the css property of increasing the height and clipping the image to those coordinates on the page(used setInterval). It’s looks like bouncing but looks little weird because of clipping.
Any suggestion or idea?
Thanks in advance.
May 28, 2013 at 4:18 am #136678Jozsef K.ParticipantCan’t say that it’s clear to me what you want to achieve.You could try animating transform:scale() rule.
Something similar you can find here:
http://cssdeck.com/labs/css-bouncing-bubble-ballsMay 28, 2013 at 10:43 am #136701Paulie_DMemberOr like this:
May 29, 2013 at 5:38 am #136832PSPParticipantThose demos move object, but for me the top and bottom edge of the image should be fixed to the screen.
May 29, 2013 at 5:52 am #136834May 29, 2013 at 6:00 am #136835CrocoDillonParticipantWith `transform: scale(…)` the box of the image is preserved as well so it doesn’t influence other elements around it.
May 29, 2013 at 6:05 am #136837Paulie_DMemberMy codepen updated to demonstrate `transform:scale` also.
May 29, 2013 at 6:42 am #136852PSPParticipantI tried with transform:scale also but i could not achieve my requirements.
It should look like top and bottom “edge” is fixed.May 29, 2013 at 6:45 am #136853unasAquilaParticipantYour looking for a Bloat effect?
May 29, 2013 at 6:45 am #136854CrocoDillonParticipantYou can’t have top and bottom fixed, and change height, all that without clipping.
Try `transform: scale(1.25, 1)`
May 29, 2013 at 6:53 am #136856unasAquilaParticipantcould you provide an image with the states you require.
May 29, 2013 at 6:58 am #136859Paulie_DMemberAdded a zoom effect to Codepen.
@PSP To be honest, I think we need to see ‘before’ & ‘after’ examples of what you are trying to achieve.EDIT: See @unasAquila has just posted the same request.
June 4, 2013 at 3:14 pm #137632PSPParticipantSorry because I do not have any image to show it. I can explain it in more clear way.
Consider a spring which is fixed on both the sides, I mean both end of spring is fixed to the certain points, now I want to pull it from the middle, so that it will be giving bouncing effect still both ends are fixed.June 5, 2013 at 3:00 am #137686Jozsef K.ParticipantLike a piece of material, blanket, that is blown by the wind, so you see the ripples only? So actually you want a ripple/wawe effect?
June 5, 2013 at 3:12 am #137688PSPParticipantYes.. Kind of… Thanks for understanding
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.